[
http://issues.apache.org/jira/browse/MYFACES-351?page=comments#action_12331477
]
alban coulange commented on MYFACES-351:
----------------------------------------
Hello,
Excuse me for commenting that but how is the bug going? will it be fixed soon?
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 message "missing node" (as bug MYFACES-159 resolved)
*************
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
> [tree2] Cannot dynamically add or delete nodes
> ----------------------------------------------
>
> Key: MYFACES-351
> URL: http://issues.apache.org/jira/browse/MYFACES-351
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: 1.0.9m9
> Environment: All
> Reporter: Jon Travis
> Assignee: sean schofield
> Attachments: TestTree2.zip
>
> We need to be able to dynamically add and delete nodes from the
> tree, and have it behave correctly. Currently if you add or delete nodes,
> you will
> get into a situation where the server will blow up with a 'duplicate ID'
> problem. Our
> application has an explorer view (tree on the left, workspace on the right).
> Part of the
> app adds new members to the tree, so we need to be able to have this
> refreshed and
> displayed correctly
> Ideally we would like to be able to use the client side feature of Tree2, but
> would use
> server-side if that is all that worked.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira