myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Udupa (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (TRINIDAD-2262) UIXComponentBase calls setInView(false) before the component is actually removed from tree
Date Fri, 27 Apr 2012 17:26:54 GMT
Prakash Udupa created TRINIDAD-2262:
---------------------------------------

             Summary: UIXComponentBase calls setInView(false) before the component is actually
removed from tree
                 Key: TRINIDAD-2262
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2262
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 2.1.0-core
            Reporter: Prakash Udupa



We currently have this code in Trinidad's org.apache.myfaces.trinidad.component.UIXComponentBase

  /**
   * Publish PreRemoveFromViewEvent to the component and all facets and children.
   *
   * @param context the current FacesContext
   * @param component the current UIComponent
   */
  private void _publishPreRemoveFromViewEvent(
    FacesContext context,
    UIComponent component)
  {
    component.setInView(false);
    context.getApplication().publishEvent(context,
PreRemoveFromViewEvent.class, UIComponent.class, component);

    if (component.getChildCount() > 0)
    {
      for (UIComponent child : component.getChildren())
      {
        _publishPreRemoveFromViewEvent(context, child);
      }
    }

    if (component.getFacetCount() > 0)
    {
      for (UIComponent child : component.getFacets().values())
      {
        _publishPreRemoveFromViewEvent(context, child);
      }
    }
  }

setInView(false) is called even before the component is actually removed from the tree. This
would cause issues elsewhere (say the PreRemoveFromViewEvent listeners) that finds that the
component is no more registered as being in the view whereas the component is not removed
yet.

Mojarra guys are also finding this bogus code in Trinidad to block their fixes (eg. http://java.net/jira/browse/JAVASERVERFACES-2390).
Some partial state saving usecases in Oracle's ADF is also not working as expected because
of this defect. This needs to be fixed, the fix could be as simple as moving setInView(false)
to be called later to actual removal.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message