1 Reply Latest reply on Oct 17, 2007 9:02 PM by Bram Biesbrouck

    MethodNotFoundException when using adviseNodeOpened

    Bram Biesbrouck Newbie

      Hi all, got a strange and stupid bug here,
      and I guess I'm doing something wrong, but I can't really figure it out.
      (Using Seam CR2 with default Richfaces jars on JBoss 4.2.1)

      I have this tree:

      <h:form>
       <rich:tree id="activeSpaceTree" styleClass="spaceExplorerTree"
       adviseNodeSelected="#{fileSystemTree.adviseTreeNodeOpened}"
       switchType="client">
      
       <rich:recursiveTreeNodesAdaptor
       roots="#{fileSystemManager.spaceTreeModel.children}"
       var="spaceExplorerTreeNode"
       nodes="#{spaceExplorerTreeNode.children}">
      
       <rich:treeNode
       dragType="dndSpaceMemberInode"
       dragIndicator=":spaceMemberDndIndicator"
      ondragend="setDndSourceInodeId(#{spaceExplorerTreeNode.inode.id})"
       acceptedTypes="[dndSpaceMemberInode]"
       ondrop="chooseDndAction(event)"
       ondropend="setDndTargetInodeId(#{spaceExplorerTreeNode.inode.id})"
       >
      
       <rich:dndParam name="label" value="#{messages[spaceExplorerTreeNode.inode.fileSystemEntity.name]}" />
      
       <h:commandLink action="#{fileSystemManager.changeSelectedSpaceMember(spaceExplorerTreeNode.inode.fileSystemEntity)}"
      value="#{messages[spaceExplorerTreeNode.inode.fileSystemEntity.name]}"
      style="#{(spaceExplorerTreeNode.inode.fileSystemEntity==fileSystemManager.selectedSpaceMember) ? 'font-weight: bold; color: white;' : ''}" />
      
       </rich:treeNode>
      
       </rich:recursiveTreeNodesAdaptor>
      
       </rich:tree>
      
      </h:form>
      


      and this tree-model-bean, just for advisor:


      @Name("fileSystemTree")
      public class FileSystemTree
      {
       public FileSystemTree()
       {
       }
      
       public Boolean adviseTreeNodeOpened(UITree tree)
       {
       Object key = tree.getRowKey();
       Object data = tree.getRowData();
      
       return null;
       }
      }
      



      When I invoke the view-tier-code, I get this exception:
      01:12:28,378 ERROR [STDERR] Oct 16, 2007 1:12:28 AM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/app/tumbolia/pages/showSpace.xhtml]
      javax.faces.el.MethodNotFoundException: /app/tumbolia/panels/main/space/showSpace.xhtml @164,65 adviseNodeSelected="#{fileSystemTree.adviseTreeNodeOpened}": Method not found: com.acepostproduction.tumbolia.models.FileSystemTree@12803d8.adviseTreeNodeOpened(org.richfaces.component.UITree)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:71)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement$1.adviseNodeSelected(TreeRendererBase.java:320)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.processAdvisors(TreeRendererBase.java:342)
       at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:241)
       at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:132)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:280)
       at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:393)
       at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:428)
       at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:318)
       at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:59)
       at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:302)
       at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:365)
       at org.richfaces.component.UITree.walk(UITree.java:323)
       at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:682)
       at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:625)
       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 com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276)
       at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
       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 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:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       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.MultipartFilter.doFilter(MultipartFilter.java:85)
       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:44)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
       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:433)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       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:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      


      Any thoughts?

      b.