[
https://issues.apache.org/jira/browse/TRINIDAD-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prakash Udupa updated TRINIDAD-2262:
------------------------------------
Status: Patch Available (was: Open)
> 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
> Attachments: TRINIDAD-2262_patch_over_trunk.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> 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