Hi,

could you explain HOW you delete the nodes? Do you click on a node,
represented by a commandLink or do you use checkboxes..or..

I had a similar problem changing the treeModel of tree (not tree2).
I implemented my own sorting for a treeTable using t:tree. After
a click on a commandLink which triggers the sorting the renderer rendered
the old treeModel, not the updated one.
The solution was to use the action attribute of the commandLink in
combination with the page navigation.

Regards,

Christian

> --- Ursprüngliche Nachricht ---
> Von: Alban Coulange <[EMAIL PROTECTED]>
> An: users@myfaces.apache.org
> Betreff: deleting nodes in tree2
> Datum: Wed, 5 Oct 2005 08:46:45 +0000 (UTC)
> 
> Hello,
> I would like to know if I was deleting nodes correctly in the tree.
> I get the tree : 
> *********************
> 
> FacesContext facesContext = FacesContext.getCurrentInstance();
>               ht = (HtmlTree) facesContext.getViewRoot()
>               .findComponent(":validationForm:validation-tree");
>               root = (ValidationTreeNode)ht.getValue();
> *******************
> 
> 
> I get the list of children, 
> *************
> Iterator it = root.getChildren().iterator();
> ************
> and remove the one I don't need any more via an iterator over that list. 
> And then : 
> **********
> ht.setValue(root); or //ht.setValue(root);
> ************
> 
> But doing this, I got strange problems : 
> I get the exception
> ***************
> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sda]] 
> Node with id 0:0. Failed to parse 0:0:0
> java.lang.IllegalArgumentException: Node with id 0:0. Failed to parse
> 0:0:0
> *************
>  or not (it is  not predictible).
> Or it looses (I think) the ids and it affects the rest of the page (some
> <br>
> are turned into &alt br &alt if I don't put MY ids)
> If I put my ids in the rest of the components, then the ergonomics is not
> affected. The last example every time I remove a node.
> For the exception above it occurs whenever it wants!
> 
> Is there a proper way to use the tree2?
> Any help would be very appreciated.
> Thanks,
> Alban.
> 
> 

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

Reply via email to