Hi Matthias, i have fixed the issue in my project. I have just added the following lines of code in the NavigationPaneRenderer (method: _writeItemLink):
for(UIComponent child : (List<UIComponent>)commandChild.getChildren()) { if (child instanceof UIXComponentBase) { RendererUtils.renderChild(FacesContext.getCurrentInstance(), child); } } Do you see any troubles with it? If no - is it (perhaps) possible to add this in further releases? With it any nested Trinidad components should be rendered in the commandNavigationItem e.g. the tr:icon element. I think it is very useful, isn't it? Regards, Sven > _______________________________ Think before you print CONFIDENTIALITY: This e-mail (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you receive this e-mail in error, please notify the sender and delete this e-mail from your system. SunGard CARNOT GmbH * Registered: Frankfurt am Main, Handelsregister Frankfurt HRB 79504 * Geschäftsführer: Harold Finders, Dr. Marc Gille, Dr. Dirk Lüth, Michael J. Ruane, Victoria Elizabeth Silbey -----Ursprüngliche Nachricht----- > Von: Rottstock, Sven [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 26. Februar 2008 10:25 > An: MyFaces Discussion > Betreff: AW: [Trinidad] commandNavigationItem and icon > > yep - here is the stack trace if you haven't set the text attribute: > > SCHWERWIEGEND: Error Rendering View[/tab1.jspx] > java.lang.NullPointerException > at > org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter. > java:171) > at > org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter.writ > e(HtmlResponseWriter.java:340) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at > org.apache.myfaces.trinidadinternal.io.IndentingResponseWriter > .write(IndentingResponseWriter.java:142) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at > org.apache.myfaces.trinidadinternal.io.DebugResponseWriter.wri > te(DebugResponseWriter.java:124) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at com.sun.facelets.StateWriter.write(StateWriter.java:116) > at > org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter.writ > e(HtmlResponseWriter.java:340) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at > org.apache.myfaces.trinidadinternal.io.IndentingResponseWriter > .write(IndentingResponseWriter.java:142) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at > org.apache.myfaces.trinidadinternal.io.DebugResponseWriter.wri > te(DebugResponseWriter.java:124) > at > org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator > .write(ResponseWriterDecorator.java:153) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer._writeItemLink(NavigationPaneRenderer.java:661) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer.appendIconAndText(NavigationPaneRenderer.java:550) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer.renderNonOverlappingItem(NavigationPaneRende > rer.java:883) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer._renderNavigationItem(NavigationPaneRenderer > .java:474) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer.renderContent(NavigationPaneRenderer.java:251) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Navig > ationPaneRenderer.encodeAll(NavigationPaneRenderer.java:97) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(Core > Renderer.java:220) > at > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeE > nd(UIXComponentBase.java:711) > at > org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd( > UIXCollection.java:525) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(Co > reRenderer.java:299) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Panel > HorizontalLayoutRenderer.encodeChild(PanelHorizontalLayoutRend > erer.java:172) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Panel > HorizontalLayoutRenderer._encodeChildren(PanelHorizontalLayout > Renderer.java:155) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Panel > HorizontalLayoutRenderer.encodeAll(PanelHorizontalLayoutRender > er.java:85) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(Core > Renderer.java:220) > at > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeE > nd(UIXComponentBase.java:711) > at > org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive > (RenderUtils.java:68) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(Co > reRenderer.java:294) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChild > ren(CoreRenderer.java:316) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Panel > PartialRootRenderer.renderContent(PanelPartialRootRenderer.java:64) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyR > enderer.renderContent(BodyRenderer.java:139) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Panel > PartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:119) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyR > enderer.encodeAll(BodyRenderer.java:79) > at > org.apache.myfaces.trinidad.render.CoreRenderer.delegateRender > er(CoreRenderer.java:330) > at > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.Docum > entRenderer.encodeAll(DocumentRenderer.java:80) > at > org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(Core > Renderer.java:220) > at > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeE > nd(UIXComponentBase.java:711) > at > com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(Comp > onentSupport.java:252) > at > com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(Comp > onentSupport.java:249) > at > com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHand > ler.java:594) > at > org.apache.myfaces.trinidadinternal.application.ViewHandlerImp > l.renderView(ViewHandlerImpl.java:182) > at > org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(Re > nderResponseExecutor.java:41) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImp > l.java:132) > at > javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt > er(ApplicationFilterChain.java:269) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli > cationFilterChain.java:188) > at > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl. > _invokeDoFilter(TrinidadFilterImpl.java:253) > at > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl. > _doFilterImpl(TrinidadFilterImpl.java:210) > at > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl. > doFilter(TrinidadFilterImpl.java:164) > at > org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(Tri > nidadFilter.java:92) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt > er(ApplicationFilterChain.java:215) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli > cationFilterChain.java:188) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW > rapperValve.java:210) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardC > ontextValve.java:174) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHost > Valve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport > Valve.java:117) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn > gineValve.java:108) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap > ter.java:151) > at > org.apache.coyote.http11.Http11Processor.process(Http11Process > or.java:870) > at > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHa > ndler.processConnection(Http11BaseProtocol.java:665) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT > cpEndpoint.java:528) > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le > aderFollowerWorkerThread.java:81) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( > ThreadPool.java:685) > at java.lang.Thread.run(Thread.java:595) > > > Unfortunately i get no stack trace if you have set an empty > text attribute. Nevertheless the icon wouldn't be rendered. > Here is a short code snippet again which i have used for the > stack trace: > > <tr:navigationPane hint="buttons"> > <tr:commandNavigationItem action="myBean.doAction"> > <tr:icon name="commandNav"/> > </tr:commandNavigationItem> > </tr:navigationPane> > > By the way: I'm using Trinidad 1.0.5 and Facelets 1.1.14. > > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Matthias Wessendorf > Gesendet: Dienstag, 26. Februar 2008 09:49 > An: MyFaces Discussion > Betreff: Re: [Trinidad] commandNavigationItem and icon > > can you show the stack trace ? > > -M > > On Tue, Feb 26, 2008 at 9:31 AM, Rottstock, Sven > <[EMAIL PROTECTED]> wrote: > > Hi list, > > > > i have any troubles with a commandNavigationItem specially > if you put > > an icon as a nested element inside the navigation item. > The following > > code snippet works well: > > > > <tr:commandNavigationItem action="#{bean.doAction}"> > > <tr:icon name="icon"/> > > </tr:commandNavigationItem> > > > > BUT if you surround the item with a navigationPane a > > NullPointerException is thrown. After adding an empty text > attribute > > the exception is gone. So far so good. But with the described > > construction the icon is no longer rendered. > > > > Does anybody know if it is the expected behaviour or is it > even a bug? > > > > Any hints would be greatly appreciated! > > > > Best Regards, > > > > Sven > > > > > > -- > Matthias Wessendorf > > further stuff: > blog: http://matthiaswessendorf.wordpress.com/ > sessions: http://www.slideshare.net/mwessendorf > mail: matzew-at-apache-dot-org >