You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by rahmoune patrick <js...@yahoo.fr> on 2006/01/11 15:39:00 UTC
tree2 node selection question
Hello,
Sorry for a certainly one more stupid tree2 question
I'm using an expanded tree2 :) and a dataTable on the same page and I have a question about node selection. The tree has a binding on the managed bean.
I have attached a commandLink with an actionListener on the tree node. This commandLink call a method on a managed bean setNodeSelected(ActionEvent e).
In the setNodeSelected(ActionEvent e), I do tree.setNodeSelected(e). And after, I can
update the dataTable with some data affected to the selected node which is retrieved
from the tree.getDataModel().getNode() method.
Note : the managed bean is in request scope.
Everything work fine for this.
The problem I have, is that when I call a commandButton located on the same page on the same managed bean, the setNodeSelected(e) method is not called (this is ok).
So, as far as I know, the current node selection is lost.
One solution is to have the managed bean is session scope and in the setNodeSelected
method, keep the id of the node in a managed bean variable.
Does someone know how to handle this use case when using a request scope managed bean?
Thank you for any help
patrick
---------------------------------
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.