You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Chris Lowe <ch...@gmail.com> on 2007/02/13 23:48:53 UTC

Re: Ajax4Jsf component not rendered

This issue still has me stumped.

Interestingly if I have a page that refers to regular MyFaces components,
then they too are not rendered.

<?xml version='1.0' encoding='UTF-8' ?>
<!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:a="https://ajax4jsf.dev.java.net/ajax"
                template="sampleTemplate.xhtml">

    <ui:define name="top">
        top
    </ui:define>

    <ui:define name="content">
<h:form>
    <a:poll action="#{action.sayHello}" interval="1000" />
    <h:commandButton value="Click me" action="#{action.sayHello}"/>
</h:form>
    </ui:define>

</ui:composition>


Can anyone offer any direction on where I can investigate?

Cheers,

Chris.


On 29/01/07, Chris Lowe <ch...@gmail.com> wrote:
>
> Thanks for the reply Matthias.
>
> I had seen that wiki and I have tried its recommendations, but I get the
> same result (component is ignored and I get the output).
>
> Any idea on what the warnings and errors from Trinidad are telling me?
>
> Cheers,
>
> Chris.
>
> On 29/01/07, Matthias Wessendorf <ma...@apache.org> wrote:
> >
> > Chris-
> >
> > never used seam, yet..
> >
> > according to [1] your web.xml should contain this for the viewhandler
> >
> > <context-param>
> >   <param-name>
> >     org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
> >   </param-name>
> >   <param-value>
> >     com.sun.facelets.FaceletViewHandler
> >   </param-value>
> > </context-param>
> >
> > instead of
> >
> > org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
> > =>
> > org.jboss.seam.ui.facelet.SeamFaceletViewHandler
> >
> > also you should (or have to) remove the VH def. from the
> > faces-config.xml file.
> >
> > -M
> >
> > [1] http://wiki.apache.org/myfaces/TrinidadSeamAjax4Jsf
> >
> > On 1/29/07, Chris Lowe <ch...@gmail.com> wrote:
> > > Hi All,
> > >
> > > So far, I have been using Trinidad and Seam together without too much
> > fuss.
> > > Now I've tried to add Ajax4Jsf into the mix, I'm having some trouble
> > getting
> > > Ajax4Jsf to work.  My pages are being rendered without throwing an
> > exception
> > > however the Ajax4Jsf components are just being ignored.  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.RenderKitBasegetRenderer
> > > 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)
> > >
> > > I have used the poller successfully in a MyFaces/Facelets/Seam project
> > that
> > > doesn't use Trinidad.  Is there anything special that I need to do in
> > order
> > > to make these libraries play together?
> > >
> > > My web.xml and faces-config.xml are below.
> > >
> > > Any help will be greatly appreciated.
> > >
> > > 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>org.jboss.seam.ui.facelet.SeamFaceletViewHandler
> > > </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>
> > >          <view-handler> org.ajax4jsf.framework.ajax.AjaxViewHandler
> > > </view-handler>
> > >      </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>
> > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>