4 Replies Latest reply on Feb 4, 2008 7:55 AM by darmstadter

    problem by modal panel reRender

      i create a navigation tree. when i right mouse click a node of the tree, it shall show a modal panel, in which is panelbar or dataTable. The node is linked with backing bean through actionListener. The problem is, the modal panel can not be rerendered. if i put those panelbar or dataTable in tabPanel, it works well.

      <rich:treeNode id="TreeNav_TreeNode2" type="DeviceNode" iconLeaf="#{item.iconPath}" icon="#{item.iconPath}" selectedClass="UnvisibleBox" >

      <a4j:commandLink value="" reRender="panelbar"
      actionListener="#{ctrl.deviceSelected}">
      <f:param name="devicePhysName" value="#{item.dataItem.physName}" />
      <h:outputText id="DeviceName" value="#{item.name}" >
      </h:outputText>
      </a4j:commandLink>
      <!-- this panelbar is rerendered in a tabpanel -->

      <rich:contextMenu id="contextMenuId" event="oncontextmenu" attached="true" submitMode="none" >
      <rich:menuItem value="Show Property" submitMode="ajax"
      oncomplete="Richfaces.showModalPanel('PropertiesPanel')"
      id="properties" actionListener="#{ctrl.deviceSelected}"
      reRender="panelbar" >
      <!-- problem by reRender, the panelbar is in modalpanel -->
      <a4j:support event="onclick" />
      <a4j:actionparam name="devicePhysName" value="#{item.dataItem.physName}" />
      </rich:menuItem>
      </rich:contextMenu
      </rich:treeNode>

        • 1. Re: problem by modal panel reRender

          the modalPanel code:

           <a4j:outputPanel id="testmodalpanel" layout="inline" >
           <rich:modalPanel id="PropertiesPanel" minHeight="240" minWidth="380"
           maxheight="640" maxwidth="640" zindex="2000" autosized="true" >
           <f:facet name="header">
           <h:outputText value="Properties" />
           </f:facet>
          
           <f:facet name="controls">
           <h:graphicImage value="/images/close.png" style="cursor:pointer"
           onclick="Richfaces.hideModalPanel('PropertiesPanel')" />
           </f:facet>
          
           <h:form id="propertiesForm" ajaxSubmit="true">
           <div align="center">
           <a4j:outputPanel ajaxRendered="true">
           <a4j:include viewId="/restricted/propertiesPanelbar.xhtml" />
           </a4j:outputPanel>
           </div>
           </h:form>
           </rich:modalPanel>
           </a4j:outputPanel>
          [/]


          • 2. Re: problem by modal panel reRender

            The problem is not solved. i need your help, Thanks a lot!

            • 3. Re: problem by modal panel reRender
              ilya_shaikovsky

              you should remove a4j:support from the menuItem as it already defined as ajaxable. Two requests fired at the same time.

              • 4. Re: problem by modal panel reRender

                very thank for your help. i have deleted the statement. but the modal panel can not be rerendered.