myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zeeshan Ghalib" <Zees...@eTechLogix.com>
Subject tree2 in panelGrid
Date Fri, 30 Dec 2005 18:54:05 GMT
Hello all,
 
I am having trouble displaying tree2 component in a panelGrid component.  It
works fine as a stand alone component on the screen.
I want to display some fields on the right side of the tree as the user
clicks on a leaf.  
After I put it inside a panelGrid component, the tree only shows the root
node and does not expand when I click on the plus image.
 
Following is my code:
 
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
 
<html>
<%@include file="inc/head.inc" %>
 
<body>
  <f:view>
   <h:form id="foo123">
       <h:panelGrid columns="2">   
    <t:tree2 id="serverTree" value="#{productBrowser.treeData}" var="node"
varNodeToggler="t" clientSideToggle="false">
     <f:facet name="productsRoot">
      <h:panelGroup>
       <t:graphicImage value="images/yellow-folder-open.png"
rendered="#{t.nodeExpanded}" border="0" />
       <t:graphicImage value="images/yellow-folder-closed.png"
rendered="#{!t.nodeExpanded}" border="0" />
       <h:outputText value="#{node.description}" styleClass="nodeFolder" />
       <h:outputText value=" (#{node.childCount})" styleClass="childCount"
rendered="#{!empty node.children}" />
      </h:panelGroup>
     </f:facet>
     <f:facet name="product">
      <h:panelGroup>
       <h:commandLink immediate="true" styleClass="#{t.nodeSelected ?
'documentSelected':'document'}" actionListener="#{t.setNodeSelected}">
        <t:graphicImage value="images/document.png" border="0" />
        <h:outputText value="#{node.description}" />
        <f:param name="docNum" value="#{node.identifier}" />
        <f:param name="productCode" value="#{node.productCode}" />
       </h:commandLink>
      </h:panelGroup>
     </f:facet>
    </t:tree2>
    <h:panelGroup>
      <h:panelGrid columns="2">
     <h:outputText value="Product Code: " />
     <h:inputText value="#{productBean.productCode}" id="productCode"
required="true"/>
 
     <h:outputText value="Description: " />
     <h:inputText value="#{productBean.description}" id="description"
required="false"/>
      </h:panelGrid>     
    </h:panelGroup>
     </h:panelGrid> 
   </h:form>
  </f:view>
 </body>
 
</html>
 
Thanks in advance.
 
Zeeshan
 

Mime
View raw message