Steffen,

I have in interface commandButton with an actionlistener who exectute this:
public void resetTree2(ActionEvent event) {
 try{
      UIComponent UIPater = event.getComponent().getParent().getParent();
      UIComponent UITree2 = UIPater.findComponent("tree2");
      UIPater.getChildren().remove(UITree2);
   }...
}

So jsf automaticly rebuild her tree model, and take the update. it's not an beautiful solution but it's work !!
Becareful, there are the myfaces tree component(with his strucutre and model), and the jsf component tree ( interface form's represantion )
Here i speak about the jsf component tree. Update this code, it's just an example, you have to find in jsf tree where is the myfaces component and then remove it.


Adrien,


Steffen Hankiewicz wrote:

Hello all again. Dear Adrien,

Thanks  a  lot  for  your response. I'm at home now, so that I can not
test your solution until tomorrow. But how do you exactly destroy your
tree?

And  if  you  really  destroy  it  to build it new: isn't your current
visualized   structure  (the  expanded  and  collapsed  nodes)  also
destroyed,  so that all the expanded nodes are collapsed again? How do
you restore the view exactly as it was before the update of the tree?

Thanks again for your help,

Steffen




Reply via email to