1 Reply Latest reply on Oct 14, 2008 3:27 PM by jbalunas.jbalunas.jboss.org

    rich:tree and contexMenu

      Hi,


      I have a rich:tree and I can see that my tree displayed. Now I want to right click on a node and display a contexMenu an choose a action to do. I iplemeted the actionListenr on the jsf file which calls a bean on the server side an ouputs some test to my log console. Now I would like to passe the node I right clicked as a value and I used the ActionEvent. When I right click the node and click on a menu, I always receive the following error



      Caused by: java.lang.ClassCastException: org.richfaces.component.html.HtmlMenuItem cannot be cast to org.richfaces.component.html.HtmlMenuItem
              at lu.ept.dt.access.dslam.web.SimpleDslamTree.audit(SimpleDslamTree.java:59)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      ........



      First I wonder why I am having that problem. Is there not a better way to passe a value. Can someone give me a hint.


      Thanks,
      Jeronimo