Looks like tree requires a "model" attribute to be set.

The error handling could certainly be better since it just throws the
NPE rather than a meaningful error, but maybe that's handled in the
MyFaces tag for tree.

I also don't see any docs on "model".   A look at TreeTag seems to
indicate that it's maybe copying the "value" attribute to "model".

Try adding a "model" attribute with the same value as "value"

The other alternatives are to write a facelets tag handler to deal
with this issue, or submit a myfaces patch so that the tag doesn't use
different names than the component does.

I'm going to cross-post this back to the facelets mailing list because
it's unclear where the best place to handle this is (well, I suspect
the best place to handle it is to clean up the tree component to not
reference an internal "model" valueBinding, but that might not be
possible).

On 9/23/05, Catalin Kormos <[EMAIL PROTECTED]> wrote:
> Hello Mike,
>
> I tryied with an empty DefaultTreeModel, and got that
> error, then i tryied also with a not empty tree model,
> and the same...
>
> Do you have any ideea about what could be wrong?
>
> Thanks
>
> --- Mike Kienenberger <[EMAIL PROTECTED]> wrote:
>
> > For what it's worth, I tried it and got the same
> > error a couple days ago.
> > I assumed that the problem was that I was trying to
> > use a dataTable
> > model and that tree required a different model type.
> >   I wasn't
> > willing to invest the time to upgrade my models at
> > that time, so I
> > didn't pursue it.
> >
> > -Mike
> >
> > On 9/22/05, Catalin Kormos <[EMAIL PROTECTED]>
> > wrote:
> > > Hello,
> > >
> > > Is there anyone who successfuly used the tree
> > table
> > > with Facelets? i'm getting the following error,
> > and
> > > can't seem to find a solution:
> > >
> > > java.lang.NullPointerException
> > >         at
> > >
> >
> org.apache.myfaces.custom.tree.HtmlTree.addToModelListeners(HtmlTree.java:829)
> > >         at
> > >
> >
> org.apache.myfaces.custom.tree.HtmlTree.encodeBegin(HtmlTree.java:706)
> > >         at
> > >
> >
> org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:441)
> > >         at
> > >
> >
> org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
> > >         at
> > >
> >
> ro.citrusmedia.lims.web.ui.component.collapsiblepanel.HtmlCollapsiblePanelRenderer.encodeChildren(HtmlCollapsiblePanelRenderer.java:71)
> > >         at
> > >
> >
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:513)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
> > >         at
> > >
> >
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:447)
> > >         at
> > >
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
> > >         at
> > >
> >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> > >         at
> > >
> >
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> > >         at
> > >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> > >         at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> > >         at
> > >
> >
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> > >         at
> > >
> >
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:158)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> > >         at
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> > >         at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> > >         at
> > >
> >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >         at
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >         at
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> > >         at
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> > >         at
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> > >         at
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> > >         at java.lang.Thread.run(Thread.java:595)
> > >
> > > Thank you.
> > >
> > > Catalin
> > >
> > >
> > >
> > > __________________________________
> > > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > > http://mail.yahoo.com
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Reply via email to