Hi,
I do have a tree2 component and a dropdown menu (selectOneMenu) in a jsp
page and would like to have the menu disabled until a node is selected
in the tree. Since I couldn't find a listener like
org.apache.myfaces.custom.tree.event.TreeSelectionListener for the tree2
component, I attached an additional actionListener to the rendered
commandLink of the tree. I needed to use the syntax <f:actionListener
type="class"> since there is already an
actionListener="#{t.setNodeSelected}" defined.
Here's my first question: Is it possible to define the method to be
called like this is possible with <h:commanLink
actionListener=#{bean.method}> instead of a class implementing the
ActionListener interface?
Assuming this is not possible, I tried to define a actionListener class
inside my backing bean class holding both the tree and the selectMenu.
This is necessary because my actionListener needs to be aware of the
these two components and hence a 'stand alone' listener would be aware
of the tree only (because this one fires the event).
But this class couldn't be found and caused a classNotFoundException
when I referenced it with the fully qualified name
com.....BeanClass.ListenerClass at the type attribute of <h:actionListener>.
Does anyone know, which the public class inside the beanclass cannot be
found?
Right now my workaround is, that I define a standalone Listener and get
the necessary components by looking up the bean in the context, but I
don't know if this is the best practise.
Any thoughts?
Regards,
Kurt