Andrew Robinson created TRINIDAD-2323:
-----------------------------------------

             Summary: ChangeManager does not apply changes that are added in 
the renderer response before phase
                 Key: TRINIDAD-2323
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2323
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 2.1.0-core
            Reporter: Andrew Robinson


In order to re-order components for components that have not yet been built yet 
(ones that will be created by the JSP tags during the buildView call of the 
RENDER_RESPONSE phase), the change manager will not apply the changes for a 
ReorderChildrenComponentChange added at that time.

Use case:
For each loop on the page and the user wants to add a new item to the beginning 
of the iteration. Because the new component does not exist yet, the user uses 
<f:view beforePhase="...EL..."> to have a callback. In tha callback, the 
backing bean adds a ReorderChildrenComponentChange to the change manager. That 
change will not be applied until the next request.

The change should be applied immediately or at least after all of the phase 
listeners have been fired.

Right now the changes are being applied at the end of the build view, but 
before the view phase listeners have been fired.

The current alternative now is to not use the components to get the current 
IDs, but for the backing bean to know the IDs of the components before they are 
created and add the change during the INVOKE_APPLICATION phase

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to