Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-9838

Bad Ajax/JS init and behavior of the Template parameters form in Templating

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6-RC2
    • Fix Version/s: 5.6-RC3, 5.6
    • Component/s: None

      Description

      In some cases the ajax refresh of the meta-widget for parameter is not correctly displayed.

      Typically :

      • Create a template with at least 2 parameters
      • make the template parameters overridable
      • create a document bound to this template
      • edit the template parameter
      • put one of the parameter as Documentproperty so that the checkbox loop is displayed
      • then change the other parameter type
        => when using Boolean (in some cases), the Ajax rerender will fail with
        Caused by: java.lang.IllegalStateException: duplicate Id for a component params_edit_form:nxw_checkbox_1
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:68)
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
        	at org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:92)
        	at org.ajax4jsf.application.AjaxStateManager.getTreeStructureToSave(AjaxStateManager.java:187)
        	at org.ajax4jsf.application.AjaxStateManager.buildViewState(AjaxStateManager.java:498)
        	at org.ajax4jsf.application.AjaxStateManager$SeamStateManagerWrapper.saveView(AjaxStateManager.java:105)
        	at org.jboss.seam.jsf.SeamStateManager.saveView(SeamStateManager.java:89)
        	at org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:454)
        	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:615)
        	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
        	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
        	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
        	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        	at org.nuxeo.ecm.platform.ui.web.lifecycle.NuxeoLifeCycleImpl.render(NuxeoLifeCycleImpl.java:98)
        	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
        

      Replacing the check box implementation for the looping from

      <nxl:widgetType name="checkbox"

      to

      <h:selectBooleanCheckbox

      seems to solve the issue.

        Attachments

          Activity

            People

            • Assignee:
              tdelprat Thierry Delprat
              Reporter:
              tdelprat Thierry Delprat
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: