incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Problem using tr:train with Facelets 1.1.11
Date Tue, 19 Dec 2006 16:57:24 GMT
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.steyn@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.TrainRenderer
> $Train.<init>(TrainRenderer.java:913)
>  at
> org.apache.myfaces.trinidadinternal.renderkit.core.desktop.TrainRenderer
> .encodeAll(TrainRenderer.java:175)
>  at
> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.j
> ava:181)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComp
> onentBase.java:712)
>  at
> org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollect
> ion.java:490)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive
> (UIXComponentBase.java:1258)
>  at
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComp
> 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(ViewHandlerWrapper
> .java:178)
>  at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderVi
> 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(Applicati
> onFilterChain.java:397)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:303)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:184)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoF
> ilter(TrinidadFilterImpl.java:327)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterI
> mpl(TrinidadFilterImpl.java:291)
>  at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(T
> rinidadFilterImpl.java:214)
>  at
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilte
> r.java:90)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:216)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:184)
>  at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
> ter.java:144)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:216)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:184)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:276)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :566)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
> 36)
>  at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
> textValve.java:240)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:179)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :566)
>  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :182)
>  at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
> :566)
>  at
> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipelin
> 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.java
> :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(Pro
> cessorTask.java:667)
>  at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked
> (ProcessorTask.java:574)
>  at
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
> 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:252)
>  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>
>
>
>
>

Mime
View raw message