3 Replies Latest reply on Apr 7, 2008 7:52 AM by Ze Manel

    Extending Richfaces Tree

    Binesh Gummadi Novice

      I have gone through CDK documentation, and it is a great way to create Ajax enabled components. I am wondering if I could use CDK to extend Richfaces component.

      I am planning to extend Rich tree and add more details for the folder and documents. Tree component only displays the folder/document name. I want to display meta data. Something like MAC finder or Windows explorer where you have folder and details next to it in the same row.

      Can I use CDK to extend Tree component. If I cannot use CDK, what is the best way to extend tree component.

      **I posted this before in RichFaces Users, I couldn't move the post to RichFaces development. So here I am. Creating a duplicate post.

        • 1. Re: Extending Richfaces Tree
          Binesh Gummadi Novice

          I am actually looking for a tree table. I found tree table in tomahawk and trinidad. I was able to run some tomahawk components but treetable is throwing errors. I will try trinidad today as it also has a treetable component.

          Can anybody recommend a tree table jsf component which works with seam? Or a way to extend richtree.

          java.lang.NullPointerException
          at com.sun.faces.renderkit.RenderKitUtils.getResponseStateManager(RenderKitUtils.java:273)
          at com.sun.faces.lifecycle.RestoreViewPhase.isPostback(RestoreViewPhase.java:270)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:137)
          at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at com.rivetlogic.jpmc.athen.servlet.filters.AthenSSOServletFilter.doFilter(AthenSSOServletFilter.java:83)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
          at java.lang.Thread.run(Thread.java:613)

          • 2. Re: Extending Richfaces Tree
            Binesh Gummadi Novice

            Trinidad treetable works just fine. I have used seamdiscs example which comes with Seam as a starting point and I was able to use couple of trinidad components.

            seamdiscs integrates seam, richfaces, trinidad and ajax4jsf of course seamlessly :-)

            • 3. Re: Extending Richfaces Tree
              Ze Manel Newbie

              I've tried the same. seam + richfaces + aja4jsf + trinidad. I created a table which is filled by my beans, but the table borders don't appear on the page when rendering, just the values but in the correct positions, the table iis like invisible.
              Any ideia what causing this?

              Thanks

              My web.xml:

              <?xml version="1.0" ?>
              <web-app 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-app_2_5.xsd" version="2.5">
              
               <!-- Ajax4jsf -->
              
               <context-param>
               <param-name>org.richfaces.SKIN</param-name>
               <param-value>blueSky</param-value>
               </context-param>
              
               <filter>
               <display-name>RichFaces Filter</display-name>
               <filter-name>richfaces</filter-name>
               <filter-class>org.ajax4jsf.Filter</filter-class>
               </filter>
              
               <filter-mapping>
               <filter-name>richfaces</filter-name>
               <servlet-name>Faces Servlet</servlet-name>
               <dispatcher>REQUEST</dispatcher>
               <dispatcher>FORWARD</dispatcher>
               <dispatcher>INCLUDE</dispatcher>
               </filter-mapping>
              
               <!-- Seam -->
              
               <listener>
               <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
              
               <filter>
               <filter-name>Seam Filter</filter-name>
               <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
               </filter>
              
               <filter-mapping>
               <filter-name>Seam Filter</filter-name>
               <url-pattern>/*</url-pattern>
               </filter-mapping>
              
               <servlet>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
               </servlet>
              
               <servlet-mapping>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>
              
               <!-- Facelets development mode (disable in production) -->
              
               <context-param>
               <param-name>facelets.DEVELOPMENT</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <!-- JSF -->
              
               <context-param>
               <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
               <param-value>.xhtml</param-value>
               </context-param>
              
               <servlet>
               <servlet-name>Faces Servlet</servlet-name>
               <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
               </servlet>
              
               <servlet-mapping>
               <servlet-name>Faces Servlet</servlet-name>
               <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
              
               <security-constraint>
               <display-name>Restrict raw XHTML Documents</display-name>
               <web-resource-collection>
               <web-resource-name>XHTML</web-resource-name>
               <url-pattern>*.xhtml</url-pattern>
               </web-resource-collection>
               <auth-constraint />
               </security-constraint>
              
               <!-- Trinidad -->
              
               <filter>
               <filter-name>trinidad</filter-name>
               <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
               </filter>
              
               <filter-mapping>
               <filter-name>trinidad</filter-name>
               <!-- This assumes that the FacesServlet has been registered -->
               <!-- under the name "faces" -->
               <servlet-name>faces</servlet-name>
               </filter-mapping>
              
               <servlet>
               <servlet-name>resources</servlet-name>
               <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
               </servlet>
              
               <!-- This cannot be configured currently -->
               <servlet-mapping>
               <servlet-name>resources</servlet-name>
               <url-pattern>/adf/*</url-pattern>
               </servlet-mapping>
              
               <context-param>
               <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
               <param-value>client</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
               <param-value>com.sun.facelets.FaceletViewHandler</param-value>
               </context-param>
              
               <context-param>
               <param-name>facelets.VIEW_MAPPINGS</param-name>
               <param-value>*.xhtml</param-value>
               </context-param>
              
              </web-app>
              


              My faces-config.xml:
              <?xml version="1.0" encoding="UTF-8"?>
              <faces-config version="1.2" 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">
              
               <!-- Facelets support -->
               <!-- <application>
               <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
               </application> -->
              
               <application>
               <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
               </application>
              </faces-config>