This problem is resolved by making the required="false" for the productCode input field.  I am now using an Iframe to display the form fields.
 
Thanks,
 
Zeeshan
 


From: Zeeshan Ghalib [mailto:[EMAIL PROTECTED]
Sent: Friday, December 30, 2005 11:54 AM
To: [email protected]
Subject: tree2 in panelGrid

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>
<[EMAIL PROTECTED] 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
 

Reply via email to