1 Reply Latest reply on Nov 22, 2011 12:51 PM by sincanvin

    Rich:Tree - Expand/Collapse moves the panel up & down

    sincanvin

      Hi,

        I am using rich:tree in my application but the issue is entire panel shifts down which also makes other panel shifts up and down on expanding and collapsing the nodes. Is there any fix for this.


        Following is the xhtml code

       

        <a4j:form> 
         <h:panelGrid id="panel_id" columns="2" style="width:1560px" cellpadding="0" cellspacing="2">
          <a4j:region selfRendered="true">
           <h:panelGroup>
            <h:panelGrid columns="1" style="width:440px">
              <rich:panel>
              <ui:include id="treeData" src="/Pages/TreeData.xhtml" />
             </rich:panel>      
             <rich:spacer height="600px" />
             </h:panelGrid>
           </h:panelGroup>
          </a4j:region>

       

          <a4j:region selfRendered="true">
           <h:panelGroup>
            <h:panelGrid columns="1" style="width:1120px">
              <rich:panel>
               <f:facet name="header">Patent Application Information Retrieval (PAIR)</f:facet>
              </rich:panel>
             </h:panelGrid>
           </h:panelGroup>
          </a4j:region>
         </h:panelGrid>
        </a4j:form>
      </h:panelGrid>

       

      TreeData.xhtml

      <rich:tree ajaxKeys="#{null}" style="width:300px"
        ajaxSubmitSelection="true"
        nodeSelectListener="#{simpleTreeBean.processSelection}"
        switchType="client" value="#{simpleTreeBean.treeNode}" var="item"
        id="tree" treeNodeVar="treeNode"
        dropListener="#{simpleTreeBean.dropListener}"
        nodeFace="#{treeNode.parent.parent == null ? 'node' : 'leaf'}">

       

      <rich:treeNode type="node">
         <h:outputText value="#{item}" />
        </rich:treeNode>

       

        <rich:treeNode type="leaf">
         <h:outputLink target="new" value="#{treeNode.leafAddress}"
          rendered="true">
          <h:outputText value="#{treeNode.data}" styleClass="hyperlinktext" />
         </h:outputLink>
        </rich:treeNode>
      </rich:tree>

       

       

      Thanks