Details
Description
If the associated contentStack of a contentStackMenu is in a separate form the following NullPointerException results:
java.lang.NullPointerException
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:561)
at org.icefaces.mobi.component.contentmenuitem.ContentMenuItemRenderer.renderItemAsList(ContentMenuItemRenderer.java:193)
at org.icefaces.mobi.component.contentmenuitem.ContentMenuItemRenderer.encodeEnd(ContentMenuItemRenderer.java:86)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at org.icefaces.mobi.renderkit.BaseLayoutRenderer.renderChild(BaseLayoutRenderer.java:52)
at org.icefaces.mobi.renderkit.BaseLayoutRenderer.renderChildren(BaseLayoutRenderer.java:38)
at org.icefaces.mobi.component.contentstackmenu.ContentStackMenuRenderer.encodeBegin(ContentStackMenuRenderer.java:123)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)
at javax.faces.component.UIData.encodeBegin(UIData.java:1118)
at org.icefaces.impl.component.UISeriesBase.encodeBegin(UISeriesBase.java:502)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1755)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
...
there are limitations in findComponent in JSF. If the component is within another naming container (like a form), then the id of the content stack will have to reflect that ....(too bad there wasn't some markup here already here for intended use, but will assume the following):_
<h:form id="form1">
<mobi:contentStackMenu contentStackId="form2:stack2".....>
......
<mobi:contentStackMenu>
</h:form>
<h:form id="form2">
<contentStack id="stack2"....>
.....
</contentStack>
</h:form>
======
has this been attempted in the sample that threw this exception? This is the approach that ace favors when limitations on findComponent arise.