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 Graeme Steyn <g....@cqu.edu.au> on 2007/01/02 00:18:57 UTC

RE: Problem using tr:train with Facelets 1.1.11

Adam,

Thank you for the feedback.  I have logged an issue in JIRA -
ADFFACES-343.  My apologies for the delay - only returned to work today.

Regards,

Graeme. 

-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com] 
Sent: Wednesday, 20 December 2006 2:57 AM
To: adffaces-user@incubator.apache.org
Subject: Re: Problem using tr:train with Facelets 1.1.11

Graeme,

It's not a Facelets problem - the issue is that your train in the second
example isn't inside of a form.  So, easy to fix.  But the train is
being very bad here - it should be logging a descriptive warning, not
blowing up.  If you could log a JIRA issue on that problem so we don't
lose track of it, that'd be much appreciated.

Thanks,
Adam


On 12/13/06, Graeme Steyn <g....@cqu.edu.au> wrote:
> Good Afternoon,
>
> I am currently experiencing a problem with the use of the Trinidad 
> tr:train component, tomahawk (t:inputDate) and facelets 1.1.11.  I am 
> using a snapshot built today from the faces-1_2-061113 branch in SVN.
> The problem that I am experiencing is that in the first test instance 
> below (example 1), the use of tr:train works correctly and renders the

> train correctly.  However, when I embed the tr:train in a facelets 
> template, as in example 2, I get the following error:
>
> java.lang.NullPointerException
>  at
> org.apache.myfaces.trinidadinternal.renderkit.core.desktop.TrainRender
> er
> $Train.<init>(TrainRenderer.java:913)
>  at
> org.apache.myfaces.trinidadinternal.renderkit.core.desktop.TrainRender
> er
> .encodeAll(TrainRenderer.java:175)
>  at
> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer
> .j
> ava:181)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXCo
> mp
> onentBase.java:712)
>  at
> org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXColle
> ct
> ion.java:490)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursi
> ve
> (UIXComponentBase.java:1258)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXCo
> mp
> onentBase.java:732)
>  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
>  at
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java
> :5
> 78)
>  at
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapp
> er
> .java:178)
>  at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.render
> Vi
> ew(ViewHandlerImpl.java:171)
>  at
>
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
> java:133)
>  at 
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
>  at 
> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
>  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
>  at
> org.apache.catalina.core.ApplicationFilterChain.servletService(Applica
> ti
> onFilterChain.java:397)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> ca
> tionFilterChain.java:303)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lt
> erChain.java:184)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeD
> oF
> ilter(TrinidadFilterImpl.java:327)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilte
> rI
> mpl(TrinidadFilterImpl.java:291)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter
> (T
> rinidadFilterImpl.java:214)
>  at
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFil
> te
> r.java:90)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> ca
> tionFilterChain.java:216)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lt
> erChain.java:184)
>  at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsF
> il
> ter.java:144)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> ca
> tionFilterChain.java:216)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lt
> erChain.java:184)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> lv
> e.java:276)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.ja
> va
> :566)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
> :5
> 36)
>  at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardC
> on
> textValve.java:240)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
> lv
> e.java:179)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.ja
> va
> :566)
>  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
> va
> :182)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.ja
> va
> :566)
>  at
> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipel
> in
> e.java:120)
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>  at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:137)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.ja
> va
> :566)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
> :5
> 36)
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>  at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239
> )
>  at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(P
> ro
> cessorTask.java:667)
>  at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlock
> ed
> (ProcessorTask.java:574)
>  at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Process
> or
> Task.java:844)
>  at
> com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask
> (R
> eadTask.java:287)
>  at
> com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java
> :2
> 12)
>  at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:25
> 2)
>  at
> com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread
> .j
> ava:75)
>
> Note: that without tr:train in the template, the pages render
correctly.
> I have made no changed to web.xml file or faces-config.xml file.  Both

> pages are being executed from the same context and packaged in the 
> same WAR file.  Would anyone now what could potentially cause this
problem?
>
> Thank you.
>
> Graeme
>
> Example 2:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC 
> "-//W3C//DTD XHTML 1.0 Strict//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html
>   xmlns="http://www.w3.org/1999/xhtml"
>   xmlns:ui="http://java.sun.com/jsf/facelets"
>   xmlns:f="http://java.sun.com/jsf/core"
>   xmlns:h="http://java.sun.com/jsf/html"
>   xmlns:t="http://myfaces.apache.org/tomahawk"
>   xmlns:tr="http://myfaces.apache.org/trinidad"
>   lang="en"
>   xml:lang="en">
> <head>
> <meta
>   http-equiv="Content-Type"
>   content="text/html; charset=ISO-8859-1" /> <meta
>   name="description"
>   content="description" />
> <meta
>   name="keywords"
>   content="keyword phrase1, keyword phrase 2, etc." />
> <!-- <meta name="robots" content="noindex,nofollow" /> --> 
> <title><ui:insert name="title">Default Title</ui:insert></title> 
> </head> <body> <f:view>
>   <div id="wrap">
>   <ui:insert name="header">
>     <ui:include src="header.xhtml" />
>   </ui:insert>
>   <tr:train
>     var="foo"
>     value="#{processTrainMenuModel}">
>     <f:facet name="nodeStamp">
>       <tr:commandNavigationItem
>         text="#{foo.label}"
>         action="#{foo.getOutcome}"
>         immediate="#{processTrainMenuModel.immediate}"
>         readOnly="#{processTrainMenuModel.readOnly}" />
>     </f:facet>
>   </tr:train>
>   <ui:insert name="content">
>     <ui:include src="content.xhtml" />
>   </ui:insert>
>   <ui:insert name="footer">
>     <ui:include src="footer.xhtml" />
>   </ui:insert>
>   </div>
>   <!-- end #wrap div-->
> </f:view>
> </body>
> </html>
>
>
> Example 1:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC 
> "-//W3C//DTD XHTML 1.0 Strict//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html
>   xmlns="http://www.w3.org/1999/xhtml"
>   xmlns:ui="http://java.sun.com/jsf/facelets"
>   xmlns:f="http://java.sun.com/jsf/core"
>   xmlns:h="http://java.sun.com/jsf/html"
>   xmlns:tr="http://myfaces.apache.org/trinidad"
>   lang="en"
>   xml:lang="en">
> <head>
> <meta
>   http-equiv="Content-Type"
>   content="text/html; charset=ISO-8859-1" /> <meta
>   name="description"
>   content="description" />
> <meta
>   name="keywords"
>   content="keyword phrase1, keyword phrase 2, etc." />
> <!-- <meta name="robots" content="noindex,nofollow" /> --> 
> <title>Header</title> </head> <body> <f:view>
>   <h:outputText
>     value="&lt;h1&gt;Quick Details&lt;/h1&gt;"
>     escape="false" />
>
>   <h:form id="personal">
>
>     <tr:train
>       var="foo"
>       value="#{processTrainMenuModel}">
>       <f:facet name="nodeStamp">
>         <tr:commandNavigationItem
>           text="#{foo.label}"
>           action="#{foo.getOutcome}"
>           immediate="#{processTrainMenuModel.immediate}"
>           readOnly="#{processTrainMenuModel.readOnly}" />
>       </f:facet>
>     </tr:train>
>
>   </h:form>
>
>   <ui:include src="../WEB-INF/templates/footer.xhtml" /> </f:view>
>
> </body>
> </html>
>
>
>
>