Announcement Announcement Module
Collapse
No announcement yet.
Richfaces tags not expanding in facelets page Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Richfaces tags not expanding in facelets page

    Hi,

    I have a working SWF / Facelets application taht I'd like to expand to use RichFaces.

    I added the following dependencies to my POM:

    Code:
    <dependency>
      <groupId>org.richfaces</groupId>
      <artifactId>com.springsource.org.richfaces</artifactId>
      <version>3.1.4.GA</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces</groupId>
      <artifactId>com.springsource.org.richfaces.impl</artifactId>
       <version>3.1.4.GA</version>
    </dependency>
    I've updated my web.xml:

    Code:
    <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
    </context-param>
    	
    <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</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>Spring MVC Servlet</servlet-name>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    The xhtml file I am trying to render:

    Code:
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    	    		xmlns:ui="http://java.sun.com/jsf/facelets"
    	  			xmlns:h="http://java.sun.com/jsf/html"
    	  			xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:a4j="http://richfaces.org/a4j"
                    xmlns:rich="http://richfaces.org/rich"
    				template="/WEB-INF/layouts/standard.xhtml">
    
    <ui:define name="title">Test Page</ui:define>
    
    <ui:define name="content">
    	<div id="content">
    		<h1>Test Header</h1>
            <rich:tabPanel selectedTab="Tab1" switchType="client">
                <rich:tab name="Tab1" label="Tab1">
                    <h:outputText value="Sample Text 1"/>
                </rich:tab>
                <rich:tab name="Tab2" label="Tab2">
                     <h:outputText value="Sample Text 2"/>
                </rich:tab>
                <rich:tab name="Tab3" label="Tab3">
                    <h:outputText value="Sample Text 3"/>
                </rich:tab>                      
            </rich:tabPanel>
    	</div>
    </ui:define>
    
    </ui:composition>
    The app is deployed to the latest (development) version of tcServer.
    No errors appear in the logs when the app is deployed, or when the page is displayed, but the rich tags are not expanded.

    I am completely stumped - I've read a load of "rich faces demo" articles, and the SWF chapter on integrating other frameworks, and I can't see anything wrong. The only thing I did notice was that the log files list all the tag libraries that are being loaded, and the rich and a4j libraries aren't listed.

    If I look in the richfaces jar files, the taglib xml files are not there. Should they be?

    Any other suggestions on what I should look for?

    Cheers,
    Gary

  • #2
    OK, it seems like the taglib xml files are in the richfaces-ui module.
    If I load that, the richfaces tags start working.

    However, I am trying to build using the spring repository and was loading richfaces and richfaces-impl from there. I cant find richfaces-ui in the bundle repository.

    Where is it?

    If I load it from another maven repo, then it brings in all the other dependencies (the two other richfaces modules and a truck load of apache commons stuff) that I already have.

    So it seems like, I either load a set of duplicate jars or I have to migrate away from the Spring bundle repo.

    Surely richfaces-ui (or an equivalent) must be somewhere in the Spring bundle repo?

    Gary

    Comment

    Working...
    X