6 Replies Latest reply on Aug 22, 2007 8:59 AM by viggo.navarsete

    panelgrid alignment and component binding

    viggo.navarsete

      I have a panelGrid with two colums. The left colum contains a tree that can be big, and the column to the right is supposed to contain detailed information when clicking on one of the nodes in the tree.

      Two questions:
      1. How do I align botn columns on top? Now when the tree gets big, the column to the right is always centered in the middle
      2. How do I update the content in the column to the right based on which node I click on? Do I have to bind the two components somehow? The data in the column to the right have to be fetched each time a new node in the tree is clicked on (from the backing bean)

      <h:panelGrid columnClasses="gridContent" columns="2">
       <r:panel>
       <f:facet name="header">
       <f:verbatim>List</f:verbatim>
       </f:facet>
       <r:tree style="width:300px" value="#{searchBean.searchResultNode.data}" var="item" nodeFace="#{item.type}">
       <r:treeNode type="searchResultNode">
       <h:outputText value="#{item.type}" />
       </r:treeNode>
       <r:treeNode type="entityNode">
       <h:outputText value="#{item.entityId}" />
       </r:treeNode>
       <r:treeNode type="organizationNode">
       <h:outputText value="#{item.organizationName}" />
       </r:treeNode>
       <r:treeNode type="stationNode">
       <h:outputText value="#{item.stationName}" />
       </r:treeNode>
       <r:treeNode type="entityNode">
       <h:outputText value="#{item.entityId}" />
       </r:treeNode>
       </r:tree>
       </r:panel>
       <r:panel>
       <f:facet name="header" >
       <f:verbatim>Details</f:verbatim>
       </f:facet>
       <f:verbatim>TODO: Insert three sections here:
       - text details
       - graph
       - map</f:verbatim>
       </r:panel>
       </h:panelGrid>


      Thanks in advance:)