That is what I was planning to do, but when I deselected the node and call the storeRisk() action command, it was never pickup only the checked nodes, the deselected node should not get stored on the treestate? Do you have some examples that I could look at it? Thanks.
-----Original Message----- From: Volker Weber [mailto:[EMAIL PROTECTED] Sent: Thursday, December 21, 2006 9:57 AM To: MyFaces Development Subject: Re: [jira] Created: (TOBAGO-224) validation of tree works incorrect Hi, no, this fix was a problem with validation. There is no issue with treeSelection, at least no known issue. I currendly working on a app which uses this and there is no problem. There is no direct way to get the nodes wich was deselected, you can just get the currently selected ones, to find out which ones are deselected you need to compare this to the initial selection. Regards, Volker 2006/12/21, Wong, Emmanuel (Sam) <[EMAIL PROTECTED]>: > Hi Volker: > Is this fix for the selectable tree issue? I download the > Tobago 1.0.9 snapshot and tried, It was not able to notify any > de-selcted checkbox in the tree leafs. I have three leafs display with > checkbox. > > First: > > _selectedCategories = new TreeState(); > //Set<DefaultMutableTreeNode> > nodeSelections = null; > > for (Enumeration e = > _categoriesTree.postorderEnumeration() ; e.hasMoreElements() ;) { > DefaultMutableTreeNode treeNode > = (DefaultMutableTreeNode)e.nextElement(); > > > _selectedCategories.getSelection().add(treeNode); > > //_selectedCategories.addSelection(treeNode); > } > > > _selectedCategories.addExpandState(_categoriesTree); > > _selectedCategories.expand(_categoriesTree, _categoriesTree.getDepth()); > > > > Second: display the tree for what tree leafs has saved, then I would > like to de-slected the one of the leafs and click the action command > "storRisk". I still have the entire display tree leafs value for the > first time display. Is there a way to able to know which one was > de-selected? > > public String storeRisk() { > // at this stage, we should collected the user input > fields. > Set<DefaultMutableTreeNode> selection = > _selectedCategories > .getSelection(); > boolean empty = selection.isEmpty(); > if (!empty) { > > _categoriesSelection.addAll(selection); > > } > > > Thanks > > -----Original Message----- > From: Volker Weber (JIRA) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 20, 2006 10:38 AM > To: [email protected] > Subject: [jira] Created: (TOBAGO-224) validation of tree works incorrect > > validation of tree works incorrect > ---------------------------------- > > Key: TOBAGO-224 > URL: http://issues.apache.org/jira/browse/TOBAGO-224 > Project: MyFaces Tobago > Issue Type: Bug > Reporter: Volker Weber > Assigned To: Volker Weber > Fix For: 1.0.10 > > > in a tree with selection=leafOnly and a selected node is a message > generated, but updateModel and invokeApplication are not skipped > > -- > 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 > > >
