Can't put layouts and toggle mode in ajax form
----------------------------------------------

                 Key: NXP-4266
                 URL: http://jira.nuxeo.org/browse/NXP-4266
             Project: Nuxeo Enterprise Platform
          Issue Type: Bug
            Reporter: Anahide Tchertchian
            Assignee: Thierry Delprat
             Fix For: 5.3.x
         Attachments: test.xhtml

The attached file shows that when clicking on "edit", some duplication if ids 
happens in ajax tree serialization.
Steps to reproduce: in DAM, select an image to fill the "currentSelection" and 
go to http://localhost:8080/nuxeo/test.faces?conversationId=0NXMAIN (keep the 
same conversation id).
Clicking on edit, the following error appears: Caused by: 
java.lang.IllegalStateException: duplicate Id for a component 
assetView:nxl_exif_info:nxw_date_time_original

Error disappears when changing layouts mode declaration from:

        <nxl:layout name="heading" mode="#{documentActions.displayMode}"
                    value="#{documentActions.currentSelection}"/>
        <nxl:layout name="damc" mode="#{documentActions.displayMode}"
                    value="#{documentActions.currentSelection}"/>
        <nxl:layout name="dublincore" mode="#{documentActions.displayMode}"
                    value="#{documentActions.currentSelection}"/>

to:

         <f:subview rendered="#{documentActions.displayMode == 'view'}">
          <nxl:layout name="heading" mode="view"
                      value="#{documentActions.currentSelection}"/>
          <nxl:layout name="damc" mode="view"
                      value="#{documentActions.currentSelection}"/>
          <nxl:layout name="dublincore" mode="view"
                      value="#{documentActions.currentSelection}"/>
          </f:subview>
          <f:subview rendered="#{documentActions.displayMode == 'edit'}">
          <nxl:layout name="heading" mode="edit"
                      value="#{documentActions.currentSelection}"/>
          <nxl:layout name="damc" mode="edit"
                      value="#{documentActions.currentSelection}"/>
          <nxl:layout name="dublincore" mode="edit"
                      value="#{documentActions.currentSelection}"/>
          </f:subview>

Hint: may be linked to a4j:form keeping some references of its children, and 
not playing ok with the fact that layouts or c:fi might change the tree 
structure (?)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to