Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.1
-
None
-
None
Description
If you click on the folder (as opposed to the +/- nav icon) of a node that has server side toggle, you will get an Invalid Bitmask exception. This is because the folders have commandLinks associated with them and they are toggling the state of the node regardless of whether the node is a leaf or not. Even though the TreeBacker adds the empty nodes as branches, the isLeaf method of TreeNodeBase is returning true b/c the child count is zero. (That's a new twist to prevent the +/- icons from showing up on empty nodes.)
Solution is to remove the commandLinks from the folder nodes and only allow expansion of the folders by the nav icons. Its possible to use <h:commandLink> in your folder facets by writing an actionListener that would check the leaf status before toggling the expanded state but that is an exercise left to the user.
I will also add a simple example that does allow <h:commandLink> (and disabled navigation icons). This example will conditionally render the command link based on the leaf status.