You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Edwin Mercado <em...@cra.com> on 2005/07/22 21:32:55 UTC

tree2 component reload

Hello all,
I'm still baffled by the JSF phases. I'm using a tree2 component
that is a tied to a getTreeData() function to retrieve the current data
from the model. Everytime I select a node, the getTreeData() function is
called 3 times. 

Now, for each tree2 node that has been selected I display
a command link to add a child node. Whenever I click add child node command 
link, the getTreeData() is called 3 times, but with a little "twist". This
is 
how it goes:

1st time:	getTreeData() gets called and return already displayed data
2nd time:	similar steps as in the 1st time.
====> the actionListener for the add child node command link gets called.
	The model is updated with the appropriate value.
3rd time:	getTreeData() get called but this time it gets the updated
	model value.

Unfortunately, after the 3rd time that getTreeData() got called with the
updated 
model value, the tree2 component displays only the previous stored value.
Now, if I selected a node THEN the updated value (the added node) gets
displayed.