Board index JavaServer Faces General Tree with selectionMode checkbox

Tree with selectionMode checkbox

Components, Ajax Framework, Utilities and More.


Posts: 4
Firstly, thanks to everyone at Primefaces for such a fantastic job. I am loving your work!

I'm using the new 3.0 tree with selection mode of checkbox. Encountered some issues, searched the forum but couldn't find any similar posts.

a) When unselecting a node the unselect event does not fire
b) Also when unselecting the selection property is not updated (unselected node is not removed). You can see this on labs showcase for checkbox tree - check all the nodes, click Display Selected, unselect some nodes, click Display Selected again - same selection as before is shown.
c) When TreeNodes with selected=true are rendered from a model the node has the ui-state-highlight class which makes them look strange against unselected nodes. Selecting with the mouse doesn't apply this style class.
d) Some of the themes (I am using pepper-grinder) have icons for the ui-state-hover background image which are very similar in colur to the checkbox background colour. This means the check marks "disappear" when you hover over the node. Again you can see this in the labs by selecting pepper-grinder theme and viewing the tree checkbox selection demo.

For a) and b) it looks like the unselectNode function in tree.js needs to writeSelections() and fireNodeUnselectEvent() in the isCheckboxSelection case of the if ?
For c) in TreeRenderer method encodeTreeNode() could possibly only apply ui-state-highlight when "selected && !checkbox" ?
For d) I have made my own theme based on pepper-grinder and used a different coloured set of icons for the ui-state-hover class.
Primefaces 3.5, Myfaces 2.1.10, Tomcat 7.0.37

Return to General