[jboss-user] [JBoss Seam] - Seam, Trinidad, Ajax4Jsf and Facelets

lowecg2004 do-not-reply at jboss.com
Wed Feb 14 15:48:46 EST 2007


I can't for the life of me get these libraries to play together.  There are no exceptions - just the Ajax4Jsf components do not render.  Without Trinidad, I have been able use the Ajax4Jsf poller just fine.

I've added a simple poller to my page as follows:

<!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:tr="http://myfaces.apache.org/trinidad"
  |       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
  | 
  | <ui:composition template="../public/common.xhtml">
  |   <ui:define name="body">
  | 
  | <form jsfc="tr:form">
  |   <a4j:poll interval="1000" action="#{paymentBean.pollPaymentStatus }" />
  | </form>
  | 
  |   ...
  |   </ui:define>
  | </ui:composition>
  | </html>

At render time, the poller is ignored and nothing is added to my page, hence no polling.  I get output like this repeated about 12 times despite there only being one instance of the poller:

14:04:26,453 ERROR [STDERR] 29-Jan-2007 14:04:26 org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
  | WARNING: Renderer 'javax.faces.ViewRoot' not found for component family 'javax.faces.ViewRoot'
  | 14:04:26,453 INFO  [[/ripuk]] No Renderer found for component {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /view/secure/payment-processing.xhtml]} (component-family=javax.faces.ViewRoot, renderer-type= javax.faces.ViewRoot)
  | 14:04:26,453 WARN  [UIComponentBase] No Renderer found for component {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /view/secure/payment-processing.xhtml]} (component-family=javax.faces.ViewRoot, renderer-type=javax.faces.ViewRoot)

Is there anything special that I need to do in order to make these libraries play together?

I have seen the wiki http://wiki.apache.org/myfaces/TrinidadSeamAjax4Jsf
and the forum posting http://jboss.com/index.html?module=bb&op=viewtopic&p=3994880

I tried their recommendations but no luck.

My web.xml and faces-config.xml are below.

Any help will be greatly appreciated - I'm starting to lose hair over this.

Best Regards,

Chris.


web.xml
  | 
  | <?xml version="1.0"?>
  | <web-app version="2.4"
  |          xmlns="http://java.sun.com/xml/ns/j2ee"
  |          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
  | 
  |   <!-- MyFaces ******************************************************************************** -->
  | 
  |     <context-param>
  |         <param-name>javax.faces.CONFIG_FILES</param-name>
  |         <param-value>/WEB-INF/navigation.xml, /WEB-INF/managed-beans.xml,/WEB-INF/con-val.xml</param-value>
  |     </context-param>
  |    
  |     <context-param>
  |         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |         <param-value>.xhtml</param-value>
  |     </context-param>
  |    
  |     <context-param>
  |         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |         <param-value>client</param-value>
  |     </context-param>
  | 
  | 
  |   <!-- Trinidad ******************************************************************************* -->
  | 
  |     <context-param>
  |         <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
  |         <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  |     </context-param>
  | 
  | 
  |   <!-- Facelets ******************************************************************************* -->
  | 
  |     <context-param>
  |         <param-name>facelets.LIBRARIES</param-name>
  |         <param-value>/WEB-INF/facelets/ripuk.taglib.xml</param-value>
  |     </context-param>
  |    
  |     <context-param>
  |         <param-name>facelets.DEVELOPMENT</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |    
  |     <context-param>
  |         <param-name>facelets.SKIP_COMMENTS</param-name>
  |         <param-value>false</param-value>
  |     </context-param>
  | 
  | 
  |   <!-- Filters ******************************************************************************** -->
  |  
  |     <!-- ajax4jsf filter - must be before any other filter -->
  |     <filter>
  |         <display-name>Ajax4jsf Filter</display-name>
  |         <filter-name>ajax4jsf</filter-name>
  |         <filter-class> org.ajax4jsf.Filter</filter-class>
  |     </filter>
  | 
  |     <filter-mapping>
  |         <filter-name>ajax4jsf</filter-name>
  |         <servlet-name>Faces Servlet</servlet-name>
  |     </filter-mapping>
  |    
  |  
  |     <filter>
  |         <filter-name>Seam Exception Filter</filter-name>
  |         <filter-class>org.jboss.seam.servlet.SeamExceptionFilter </filter-class>
  |     </filter>
  |    
  |     <filter-mapping>
  |         <filter-name>Seam Exception Filter</filter-name>
  |         <url-pattern>*.seam</url-pattern>
  |     </filter-mapping>
  |    
  |      
  |     <filter>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
  |     </filter>
  |    
  |     <filter-mapping>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <url-pattern>*.seam</url-pattern>
  |     </filter-mapping>
  |    
  |    
  |     <filter>
  |         <filter-name>trinidad</filter-name>
  |         <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter </filter-class>
  |     </filter>
  |    
  |     <filter-mapping>
  |         <filter-name>trinidad</filter-name>
  |         <servlet-name>Faces Servlet</servlet-name>
  |     </filter-mapping>
  | 
  |  
  |   <!-- Listeners ****************************************************************************** -->
  |  
  |     <listener>
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>
  |    
  |     <listener>
  |         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
  |     </listener>
  | 
  |  
  |   <!-- Servlets ******************************************************************************* -->
  |  
  |     <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>
  | 
  | 
  |     <servlet>
  |         <servlet-name>resources</servlet-name>
  |         <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet </servlet-class>
  |     </servlet>
  |    
  |     <servlet-mapping>
  |         <servlet-name>resources</servlet-name>
  |         <url-pattern>/adf/*</url-pattern>
  |     </servlet-mapping>
  |  
  | 
  |   <!-- Misc *********************************************************************************** -->
  | 
  |     <login-config>
  |         <auth-method>BASIC</auth-method>
  |     </login-config>
  | 
  |     <error-page>
  |         <error-code>404</error-code>
  |         <location>/view/public/home.seam</location>
  |     </error-page>
  | 
  |     <session-config>
  |         <session-timeout>30</session-timeout>
  |     </session-config>   
  | </web-app>
  | 
  | 
  | 
  | faces-config.xml
  | 
  | <faces-config>
  | 
  |     <application>
  |          <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
  |      </application>
  | 
  |     <lifecycle>
  |         <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
  |     </lifecycle>
  | 
  |   <application>
  |         <message-bundle>messages</message-bundle>
  |         <locale-config>
  |             <default-locale>en</default-locale>
  |             <supported-locale>en</supported-locale>
  |         </locale-config>
  |     </application>
  |    
  | </faces-config>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016616#4016616

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016616



More information about the jboss-user mailing list