MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-1010

Nested elements like tr:icon are not rendered in a commandNavigationItem if it is in a navigationPane

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3-core
    • Fix Version/s: 1.2.10-core, 1.0.10-core
    • Component/s: Components
    • Labels:
      None
    • Environment:
      Trinidad 1.0.3, MyFaces 1.1.5, Tomcat 5.5, Facelets 1.1.14

      Description

      If you surround a commanNavigationItem with a navigationPane then any nested elements like a tr:icon are longer visible. Furthermore if the text attribute is left then a NullPointerException is thrown.

      For following code snippet works well:
      <tr:document>
      <tr:form>
      <tr:commandNavigationItem action="#

      {bean.doAction}

      ">
      <tr:icon name="myAction"/>
      </tr:commandNavigationItem>
      </tr:form>
      </tr:document>

      But if you surround the item with a navigationPane then you would run in the described troubles.

      Here is the stack trace for NPE:

      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.write(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.write(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.write(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.write(DebugResponseWriter.java:124)
      at org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator.write(ResponseWriterDecorator.java:153)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer._writeItemLink(NavigationPaneRenderer.java:661)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.appendIconAndText(NavigationPaneRenderer.java:550)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.renderNonOverlappingItem(NavigationPaneRenderer.java:883)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer._renderNavigationItem(NavigationPaneRenderer.java:474)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.renderContent(NavigationPaneRenderer.java:251)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer.encodeAll(NavigationPaneRenderer.java:97)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:525)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelHorizontalLayoutRenderer.encodeChild(PanelHorizontalLayoutRenderer.java:172)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelHorizontalLayoutRenderer._encodeChildren(PanelHorizontalLayoutRenderer.java:155)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelHorizontalLayoutRenderer.encodeAll(PanelHorizontalLayoutRenderer.java:85)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:68)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:64)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:139)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:119)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:79)
      at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:330)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:80)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594)
      at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.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(TrinidadFilter.java:92)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
      at java.lang.Thread.run(Thread.java:595)

        Activity

        Hide
        Sven Rottstock added a comment -

        The patch should resolve the NullPointerException and nested elements should be rendered now.

        Show
        Sven Rottstock added a comment - The patch should resolve the NullPointerException and nested elements should be rendered now.
        Hide
        Matthias Weßendorf added a comment -

        not yet committed, so fix-version is not something which should be set.

        Show
        Matthias Weßendorf added a comment - not yet committed, so fix-version is not something which should be set.
        Hide
        Matthias Weßendorf added a comment -

        finally fixed in both versions, but on trunk

        Show
        Matthias Weßendorf added a comment - finally fixed in both versions, but on trunk

          People

          • Assignee:
            Matthias Weßendorf
            Reporter:
            Sven Rottstock
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development