1 Reply Latest reply on Oct 17, 2009 6:55 PM by Wolfgang Bergbauer

    IllegalArgumentException when using contextmenu in recursive

    Wolfgang Bergbauer Newbie

      Hi all,

      I have implemented a tree with the recursiveTreeNodesAdaptor. The tree is rendering perfectly.
      But as soon as I add a contextmenu, I am getting the exception below.
      I am using Richfaces 3.3.1 and seam 2.2.0.

      Thanks for any help.

      Wolfgang


      Here is my tree:

      <rich:tree id="treeTestTree" switchType="ajax" ajaxSingle="true">
       <rich:recursiveTreeNodesAdaptor
       id="treeTestRecursiveTreeNodesAdaptor"
       roots="#{organizationTree.rootNodes}" var="_treeTest"
       nodes="#{_treeTest.children}">
       <rich:treeNode>
       <h:outputText value="#{_treeTest.name}" />
       <rich:contextMenu event="onclick" submitMode="ajax">
       <rich:menuItem value="Test">
       </rich:menuItem>
       </rich:contextMenu>
       </rich:treeNode>
      
       </rich:recursiveTreeNodesAdaptor>
       </rich:tree>



      java.lang.IllegalArgumentException: treeTestRecursiveTreeNodesAdaptor
       at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:587)
       at org.ajax4jsf.renderkit.RendererUtils.findComponentFor(RendererUtils.java:877)
       at org.ajax4jsf.renderkit.RendererUtils.findComponentFor(RendererUtils.java:854)
       at org.richfaces.renderkit.html.ContextMenuRendererBase.getClientAttachmentOptions(ContextMenuRendererBase.java:253)
       at org.richfaces.renderkit.html.ContextMenuRendererBase.encodeChildren(ContextMenuRendererBase.java:181)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:255)
       at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:116)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:294)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:416)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:451)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:339)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:80)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:323)
       at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:387)
       at org.richfaces.component.UITree.walk(UITree.java:422)
       at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:672)
       at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:618)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)