5 Replies Latest reply on Mar 31, 2011 4:23 PM by naveenm

    Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version

    naveenm
      Hello,

      I'm using Seam 2.2.1.Final version, richfaces 3.3.3.Final version and JSF 1.2_12-b01-FCS. I'm facing an issue with loading rich:tree dynamically on select of a rich:comboBox, when I select a value on combobox I need to load the rich tree and render it, but apparently the rich:tree rendering is happening.

      The same use case works fine with Seam 1.2.1.GA version, richfaces 3.3.3.Final version and JSF 1.2_12-b01-FCS.

      I'm deploying my code on Weblogic 10g.

      I'm trying to upgrade the seam jars and because of this issue I'm not able move forward. Could you please help?


      Here is my code:


      ************** Start web.xml ***************
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

        <welcome-file-list>
          <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>

        <session-config>
                <session-timeout>30</session-timeout><!-- timeout in minutes -->
        </session-config>
       
        <context-param>
          <param-name>com.sun.faces.verifyObjects</param-name>
          <param-value>false</param-value>
        </context-param>
        <context-param>
          <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
        </context-param>
        <context-param>
          <param-name>org.richfaces.SKIN</param-name>
          <param-value>glassX</param-value>
        </context-param>
        <context-param>
          <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
          <param-value>NONE,NEKO</param-value>
        </context-param>
        <context-param>
          <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
          <param-value>true</param-value>
        </context-param>
        <!-- Facelets development mode (disable in production) -->
        <context-param>
          <param-name>facelets.DEVELOPMENT</param-name>
          <param-value>${debug}</param-value>
        </context-param>
        <context-param>
          <param-name>facelets.BUFFER_SIZE</param-name>
          <param-value>5000000</param-value>
        </context-param>
        <context-param>
          <param-name>com.sun.faces.responseBufferSize</param-name>
          <param-value>5000000</param-value>
        </context-param>
        <!-- JSF -->
        <context-param>
          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
          <param-value>client</param-value>
        </context-param>
        <context-param>
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
          <param-value>.xhtml</param-value>
        </context-param>

        <filter>
          <filter-name>Seam Filter</filter-name>
          <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
        </filter>
        <filter-mapping>
          <filter-name>Seam Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
       
        <filter>
             <filter-name>Seam Exception Filter</filter-name>
          <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
        </filter>
       
        <!-- Seam Listener -->
        <listener>
          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
        </listener>

        <listener>
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
        </listener>
                     
        <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
        </servlet>


        <context-param>
          <param-name>javax.faces.CONFIG_FILES</param-name>
          <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>

        <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.xhtml</url-pattern>
        </servlet-mapping>
       
        <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.seam</url-pattern>
        </servlet-mapping>
       
        <!-- Making the RichFaces skin spread to standard HTML controls  --> 
        <context-param>
             <param-name>org.richfaces.CONTROL_SKINNING</param-name>
             <param-value>enable</param-value>
        </context-param>
           
             
        <login-config>
               <auth-method>BASIC</auth-method>
        </login-config>

        <error-page>
               <exception-type>java.lang.Throwable</exception-type>      
             <location>/pages/Error.xhtml</location>
        </error-page>
             
      </web-app>
      ***************** End web.xml **************



      **************** Start faces-config.xml ****************
      <?xml version="1.0" encoding="UTF-8"?>

      <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
          version="1.2">

           <application>
                <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
                <message-bundle>messages</message-bundle>
                
                <locale-config>
                  <default-locale>en</default-locale>
                  <supported-locale>en-US</supported-locale>
                </locale-config>
           </application>
           
      </faces-config>
      ************* End faces-config.xml ******************



      ************ Start components.xml *******************
      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
           xmlns:core="http://jboss.com/products/seam/core"
           xmlns:drools="http://jboss.com/products/seam/drools"
           xmlns:web="http://jboss.com/products/seam/web"
           xmlns:security="http://jboss.com/products/seam/security"
           xmlns:framework="http://jboss.com/products/seam/framework"
           xmlns:mail="http://jboss.com/products/seam/mail"
           xmlns:pdf="http://jboss.com/products/seam/pdf"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">

      <web:exception-filter url-pattern="*.xhtml,*.seam"/>

      <component auto-create="true" class="com.seam3test.action.TreeTestAction"
                     name="treeTestAction"/>

      </components>
      **************** End components.xml *******************



      *************** Start pages.xml *********************
      <?xml version="1.0" encoding="UTF-8"?>
      <pages xmlns="http://jboss.com/products/seam/pages"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
            
           <exception class="org.jboss.seam.framework.EntityNotFoundException">
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="warn">Record not found</message>
                </redirect>
           </exception>

           <exception class="javax.persistence.EntityNotFoundException">
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="warn">Record not found</message>
                </redirect>
           </exception>

           <exception class="javax.persistence.EntityExistsException">
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="warn">Duplicate record</message>
                </redirect>
           </exception>

           <exception class="javax.persistence.OptimisticLockException">
                <end-conversation />
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="warn">Another user changed the same data, please
                          try again</message>
                </redirect>
           </exception>

           <exception class="org.jboss.seam.security.AuthorizationException">
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="ERROR">You don't have permission to access this
                          resource</message>
                </redirect>
           </exception>

           <exception class="org.jboss.seam.security.NotLoggedInException">
                <redirect view-id="/pages/login.xhtml">
                     <message severity="warn">#{messages['org.jboss.seam.NotLoggedIn']}</message>
                </redirect>
           </exception>

           <exception class="javax.faces.application.ViewExpiredException">
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="warn">Your session has timed out, please try
                          again</message>
                </redirect>
           </exception>

           <exception class="org.jboss.seam.framework.EntityNotFoundException" log="false">
              <http-error error-code="404"/>
          </exception>
           
           <exception class="org.jboss.seam.framework.EntityNotFoundException" log="false">
              <http-error error-code="500"/>
          </exception>
         
           <exception class="org.jboss.seam.ConcurrentRequestTimeoutException" log-level="trace">
                <http-error error-code="503" />
           </exception>

           <exception>
                <redirect view-id="/pages/Error.xhtml">
                     <message severity="ERROR">Unexpected error, please try again</message>
                </redirect>
           </exception>
      </pages>
      ************ End pages.xml *******************



      ************** Start Javan Bean ***********************
      package com.seam3test.action;

      import java.io.Serializable;
      import java.util.ArrayList;
      import java.util.List;

      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.richfaces.component.html.HtmlTree;
      import org.richfaces.event.NodeSelectedEvent;
      import org.richfaces.model.TreeNode;
      import org.richfaces.model.TreeNodeImpl;

      @Scope(ScopeType.PAGE)
      @Name("treeTestAction")
      public class TreeTestAction implements Serializable{
           
           private static final long serialVersionUID = 7013787589153013508L;

           private TreeNode<String> rootNode;
           
           private List<String> firstList = new ArrayList<String>();
           private List<String> secondList = new ArrayList<String>();
           private String firstSelection;
           private String secondSelection;
           private String selectedNode;
           
           
           public TreeTestAction() {
                
           }
           
           public TreeNode<String> getTreeHierarchies() {
                TreeNodeImpl<String> rootNodeImpl = new TreeNodeImpl<String>();
                
                TreeNodeImpl<String> subNode1 =  new TreeNodeImpl<String>();
                subNode1.setData("Test1");
                rootNodeImpl.addChild("Test Child1", subNode1);
                
                TreeNodeImpl<String> subNode2 =  new TreeNodeImpl<String>();
                subNode2.setData("Test2");
                rootNodeImpl.addChild("Test Child2", subNode2);
                
                return rootNode;
           }
           
           public void processSelection(NodeSelectedEvent event) {
                HtmlTree tree = (HtmlTree) event.getComponent();
               String key = tree.getRowKey().toString();
               String rowData = tree.getRowData().toString();
              
               System.out.println("Key: " + key + ", RowData: " + rowData);
              
           }
           
           public TreeNode<String> getRootNode() {
                return rootNode;
           }
           
           public void setRootNode(TreeNode<String> rootNode) {
                this.rootNode = rootNode;
           }
           
           public List<String> getFirstList() {
                if(firstList.size() < 1) {
                     for(int i=1; i<=3; i++) {
                          firstList.add("First Dropdown - "+i);
                     }               
                }
                return firstList;
           }
           
           public void setFirstList(List<String> firstList) {
                this.firstList = firstList;
           }
           
           public List<String> getSecondList() {
                if(secondList.size() < 1) {
                     for(int i=1; i<=3; i++) {
                          secondList.add("Second Dropdown - "+i);
                     }               
                }
                return secondList;
           }
           
           public void setSecondList(List<String> secondList) {
                this.secondList = secondList;
           }

           public String getFirstSelection() {
                return firstSelection;
           }

           public void setFirstSelection(String firstSelection) {
                this.firstSelection = firstSelection;
           }

           public String getSecondSelection() {
                return secondSelection;
           }

           public void setSecondSelection(String secondSelection) {
                this.secondSelection = secondSelection;
           }

           public String getSelectedNode() {
                return selectedNode;
           }

           public void setSelectedNode(String selectedNode) {
                this.selectedNode = selectedNode;
           }
           
      }
      **************** End Javan Bean ********************



      **************** Start MyXhtml.xhtml *****************
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"
               xmlns:a4j="http://richfaces.org/a4j"        
              xmlns:rich="http://richfaces.org/rich"
              xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"     
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:c="http://java.sun.com/jstl/core"
                xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                contentType="text/html">

      <f:view>
      <body>

      <rich:panel>
           <a4j:form ajaxSubmit="true">
           <h:panelGrid columns="1">
                <!--  <rich:column>
                     <rich:comboBox id="firstSelection" suggestionValues="#{treeTestAction.firstList}"
                          value="#{treeTestAction.firstSelection}">
                          <a4j:support event="onselect" ajaxSingle="true" limitToList="true"
                               process="firstSelection" status="waitstatus"/>     
                     </rich:comboBox>
                </rich:column> -->
                <rich:column>
                     <rich:comboBox id="secondSelection" suggestionValues="#{treeTestAction.secondList}"
                          value="#{treeTestAction.secondSelection}">
                          <a4j:support event="onselect" ajaxSingle="true" limitToList="true"
                               process="secondSelection" reRender="treeOutput" status="waitstatus"/>     
                     </rich:comboBox>
                </rich:column>
           </h:panelGrid>     
           
           <a4j:outputPanel id="treeOutput" ajaxRendered="true">
           <rich:tree id="tree" switchType="client"
              ajaxSubmitSelection="true"  ajaxSingle="true" ajaxKeys="#{null}"
              value="#{treeTestAction.treeHierarchies}"
              nodeSelectListener="#{treeTestAction.processSelection}"
              var="item" status="waitstatus">            
                   <rich:treeNode>
                        <h:outputText value="#{item}"></h:outputText>
                        <rich:toolTip style="white-space:nowrap" followMouse="true"
                              direction="top-left" showDelay="300">
                             <h:outputText value="#{item}"></h:outputText>
                        </rich:toolTip>
                   </rich:treeNode>
           </rich:tree>
           </a4j:outputPanel>
           </a4j:form>          
      </rich:panel>

      <a4j:include  viewId="/pages/UtilityPanels.xhtml" />

      </body>
      </f:view>

      </html>          
      ***************** End MyXhtml.xhtml *****************



      ******************** Start UtilityPanels.xhtml **************
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
               xmlns:a4j="http://richfaces.org/a4j"        
              xmlns:rich="http://richfaces.org/rich"
              xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"     
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:s="http://jboss.com/products/seam/taglib"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
           


      <a4j:region>
           <a4j:status onstart="#{rich:component('wait')}.show()" 
                       onstop="#{rich:component('wait')}.hide()" id="waitstatus"/> 
           <rich:modalPanel id="wait" autosized="true" width="175" height="25" top="100px;"           
                 moveable="false" resizeable="false"> 
               <f:facet name="header"> 
                   <h:outputText value="Processing" /> 
               </f:facet> 
               <div align="center" style="margin-bottom: 10px;">
                    <h:outputText value="Please Wait..."/>
               </div>          
               <img src="#{request.contextPath}/images/icons/LoadingProgressBar.gif"
                    border="0" style="margin-left: 45px;"/>
           </rich:modalPanel>   
      </a4j:region>

      </ui:composition>
      ************ End UtilityPanels.xhtml *******************



      ********************* Start Error.xhtml ******************
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <f:view xmlns="http://www.w3.org/1999/xhtml"
               xmlns:a4j="http://richfaces.org/a4j"        
              xmlns:rich="http://richfaces.org/rich"
              xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"     
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:c="http://java.sun.com/jstl/core"
                contentType="text/html" template="/layout/template.xhtml">
                

      <head>
           <title>
                Error
           </title>               
      </head>

           <div class="errorHeader">Error</div>
           <span id="errorDetails" class="errorExceptions">
                <p>An error occurred, please contact support with the below information.</p>             
           </span>
          
           <rich:messages styleClass="errorMessage" showDetail="true"></rich:messages>

           <h:messages id="errorMessage" styleClass="errorMessage"/>

      </f:view>
      ******************** End Error.xhtml ***************

      ************** Start classpath ********************
      <?xml version="1.0" encoding="UTF-8"?>
      <classpath>
           <classpathentry kind="src" path="src"/>
           <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
           <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/activation.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ant-antlr.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr-runtime.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cglib-nodep.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-codec.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-digester.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-httpclient.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-io.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/concurrent.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/core.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dom4j.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/glassX-3.3.3.Final.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-annotations.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-commons-annotations.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-core.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-entitymanager.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-search.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate-validator.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/htmlparser.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpclient.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpcore.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/javassist.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxrs-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-el.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-debug.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-excel.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-flex.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-ioc.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-jul.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-mail.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-pdf.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-remoting.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-resteasy.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-rss.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-ui.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-wicket-ant.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam-wicket.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-seam.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-system.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jboss-vfs.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jcl-over-slf4j.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jcommon.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jms.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-facelets.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsf-impl.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsp-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jsr181-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jstl-1.2.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jta.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jxl.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/log4j.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/lucene-core.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mail.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/resteasy-atom-provider.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/resteasy-jaxb-provider.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/resteasy-jaxrs.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/resteasy-jettison-provider.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/richfaces-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/richfaces-impl.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/richfaces-ui.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/servlet-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/slf4j-api.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/slf4j-log4j12.jar"/>
           <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring.jar"/>
           <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
      </classpath>
      ******************End classpath ********************


      Kindly help!

      Thanks,
      Naveen
        • 1. Re: Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version
          naveenm

          Can someone please help with this issue?

          • 2. Re: Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version
            naveenm
            BTW there is a typo in my original post, the rendering is not* happening.
            • 3. Re: Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version
              naveenm

              Hello can someone please help me on this?


              Atleast let me know if I can file a JIRA for this issue.

              • 4. Re: Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version
                naveenm
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                <html xmlns="http://www.w3.org/1999/xhtml"
                         xmlns:a4j="http://richfaces.org/a4j"        
                        xmlns:rich="http://richfaces.org/rich"
                        xmlns:f="http://java.sun.com/jsf/core"
                          xmlns:h="http://java.sun.com/jsf/html"     
                          xmlns:ui="http://java.sun.com/jsf/facelets"
                          xmlns:s="http://jboss.com/products/seam/taglib"
                          xmlns:c="http://java.sun.com/jstl/core"
                          xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                          contentType="text/html">

                <f:view>
                <body>

                <rich:panel>
                     <a4j:form ajaxSubmit="true">
                     <h:panelGrid columns="2">
                          <rich:column>
                               <rich:comboBox id="secondSelection" suggestionValues="#{treeTestAction.secondList}"
                                    value="#{treeTestAction.secondSelection}">
                                    <a4j:support event="onselect" ajaxSingle="true" limitToList="true"
                                         process="secondSelection" reRender="treeOutput" status="waitstatus"/>     
                               </rich:comboBox>
                          </rich:column>
                          <rich:column>
                                    <a4j:commandButton action="#{treeTestAction.getTreeHierarchies}" 
                                              reRender="treeOutput,tree"
                                              status="waitstatus" value="test"/>
                          </rich:column>
                          
                     </h:panelGrid>     
                     

                                              
                     <a4j:outputPanel id="treeOutput" ajaxRendered="true">
                     <rich:tree id="tree" switchType="ajax"
                        ajaxSubmitSelection="true"  ajaxSingle="true" ajaxKeys="#{null}"
                        value="#{treeTestAction.treeHierarchies}"
                        nodeSelectListener="#{treeTestAction.selectNode}"
                        var="item" status="waitstatus" rendered="#{treeTestAction.showTree}">            
                             <rich:treeNode changeExpandListener="#{treeTestAction.processSelection}">
                                  <h:outputText value="#{item}"></h:outputText>
                                  <rich:toolTip style="white-space:nowrap" followMouse="true"
                                        direction="top-left" showDelay="300">
                                       <h:outputText value="#{item}"></h:outputText>
                                  </rich:toolTip>
                             </rich:treeNode>
                     </rich:tree>
                     </a4j:outputPanel>
                     

                     </a4j:form>          
                </rich:panel>

                <a4j:include  viewId="/pages/UtilityPanels.xhtml" />

                </body>
                </f:view>

                </html>          
                          
                • 5. Re: Dynamic load of rich tree fails with Seam 2.2.1.Final version and richfaces 3.3.3.Final version
                  naveenm
                  Latest Files: TreeTestAction
                  ----------------------------
                  package com.seam3test.action;

                  import java.io.Serializable;
                  import java.util.ArrayList;
                  import java.util.List;

                  import org.jboss.seam.ScopeType;
                  import org.jboss.seam.annotations.Scope;
                  import org.richfaces.component.html.HtmlTree;
                  import org.richfaces.event.NodeSelectedEvent;
                  import org.richfaces.model.TreeNode;
                  import org.richfaces.model.TreeNodeImpl;

                  @Scope(ScopeType.PAGE)
                  public class TreeTestAction implements Serializable{
                       
                       private static final long serialVersionUID = 7013787589153013508L;

                       private TreeNode<String> rootNode;
                       
                       private List<String> firstList = new ArrayList<String>();
                       private List<String> secondList = new ArrayList<String>();
                       private String firstSelection;
                       private String secondSelection;
                       private String selectedNode;     
                       
                       public TreeTestAction() {
                            
                       }
                       
                       public void loadTree() {
                            rootNode = getTreeHierarchies();                    
                       }
                       
                       public TreeNode<String> getTreeHierarchies() {
                            rootNode = new TreeNodeImpl<String>();          
                            
                            TreeNodeImpl<String> subNode1 =  new TreeNodeImpl<String>();
                            subNode1.setData("Test1");
                            rootNode.addChild("Test Child1", subNode1);
                            
                            TreeNodeImpl<String> subNode2 =  new TreeNodeImpl<String>();
                            subNode2.setData("Test2");
                            rootNode.addChild("Test Child2", subNode2);
                            return rootNode;
                       }
                       
                       public void processSelection(NodeSelectedEvent event) {
                            HtmlTree tree = (HtmlTree) event.getComponent();
                           String key = tree.getRowKey().toString();
                           String rowData = tree.getRowData().toString();
                          
                           System.out.println("Key: " + key + ", RowData: " + rowData);
                          
                       }
                       


                       public TreeNode<String> getRootNode() {
                            return rootNode;
                       }
                       
                       public void setRootNode(TreeNode<String> rootNode) {
                            this.rootNode = rootNode;
                       }
                       
                       public List<String> getFirstList() {
                            if(firstList.size() < 1) {
                                 for(int i=1; i<=3; i++) {
                                      firstList.add("First Dropdown - "+i);
                                 }               
                            }
                            return firstList;
                       }
                       
                       public void setFirstList(List<String> firstList) {
                            this.firstList = firstList;
                       }
                       
                       public List<String> getSecondList() {
                            if(secondList.size() < 1) {
                                 for(int i=1; i<=3; i++) {
                                      secondList.add("Second Dropdown - "+i);
                                 }               
                            }
                            return secondList;
                       }
                       
                       public void setSecondList(List<String> secondList) {
                            this.secondList = secondList;
                       }

                       public String getFirstSelection() {
                            return firstSelection;
                       }

                       public void setFirstSelection(String firstSelection) {
                            this.firstSelection = firstSelection;
                       }

                       public String getSecondSelection() {
                            return secondSelection;
                       }

                       public void setSecondSelection(String secondSelection) {
                            this.secondSelection = secondSelection;
                       }

                       public String getSelectedNode() {
                            return selectedNode;
                       }

                       public void setSelectedNode(String selectedNode) {
                            this.selectedNode = selectedNode;
                       }
                       
                       
                  }




                  MyXhtml.xhtml
                  ---------------------------
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                  <html xmlns="http://www.w3.org/1999/xhtml"
                           xmlns:a4j="http://richfaces.org/a4j"        
                          xmlns:rich="http://richfaces.org/rich"
                          xmlns:f="http://java.sun.com/jsf/core"
                            xmlns:h="http://java.sun.com/jsf/html"     
                            xmlns:ui="http://java.sun.com/jsf/facelets"
                            xmlns:s="http://jboss.com/products/seam/taglib"
                            xmlns:c="http://java.sun.com/jstl/core"
                            xmlns:fn="http://java.sun.com/jsp/jstl/functions"
                            contentType="text/html">

                  <f:view>
                  <body>

                  <rich:panel>
                       <a4j:form ajaxSubmit="true">
                       <h:panelGrid columns="2">
                            <rich:column>
                                 <rich:comboBox id="secondSelection" suggestionValues="#{treeTestAction.secondList}"
                                      value="#{treeTestAction.secondSelection}">
                                           
                                 </rich:comboBox>
                            </rich:column>
                            <rich:column>
                                      <a4j:commandButton action="#{treeTestAction.loadTree}"  ajaxSingle="true"
                                                reRender="treeOutput,tree"
                                                status="waitstatus" value="test"/>
                            </rich:column>
                            
                       </h:panelGrid>     
                       

                                                
                       <a4j:outputPanel id="treeOutput" ajaxRendered="true">
                       <rich:tree id="tree" switchType="ajax" nodeSelectListener="#{treeTestAction.processSelection}"
                          ajaxSubmitSelection="true"  ajaxSingle="true" ajaxKeys="#{null}"
                          value="#{treeTestAction.treeHierarchies}" var="item" status="waitstatus">            
                              
                               <rich:treeNode>
                                    <h:outputText value="#{item}"></h:outputText>
                                    <rich:toolTip style="white-space:nowrap" followMouse="true"
                                          direction="top-left" showDelay="300">
                                         <h:outputText value="#{item}"></h:outputText>
                                    </rich:toolTip>
                               </rich:treeNode>
                       </rich:tree>
                       </a4j:outputPanel>
                       

                       </a4j:form>          
                  </rich:panel>

                  <a4j:include  viewId="/pages/UtilityPanels.xhtml" />

                  </body>
                  </f:view>

                  </html>