I have been trying to implement the Tomahawk tree control with the column tag using a CheckBox control within the column, I am not able to determine what checkbox was checked for what node in the tree. Here is my original jsf tree code:
I loaded several nodes into the TreeModel object. Once the screen was displayed with all the nodes, I thought, all should work fine without having to do anything. That is, that if I selected a checkbox that the node I selected would be selected for the specific node selected in the tree (ie. the node in the TreeModel object would have it's "selected" attribute to be true). However, this doesn't seem to be the case and all the "selected" attributes for all nodes are still false. It looks like you can't change data within a TreeModel object once it is rendered on the screen.
So, I thought I would try to programatically try to get the node selected and perhaps set it in the TreeModel upon checking the checkbox. To do this, I added the valueChangeListener MyController.doNodeSelected and an attribute "aNumber" so I could tell what node was checked.
I'm using tomahawk12-1.1.9. My TreeModel object for use in my tree control has several objects in it where the object has an attribute "aNumber". I'm finding that both the f:param and f:attribute are not returning the correct "aNumber" when used with either the commandLink or selectBooleanCheckBox control. I've tried both the f:param and f:attribute on both the commandLink and selectBooleanCheckBox control, but when I select the commandLink "Edit" link or select a checkbox, I am always getting the LAST "aNumber" on the page. Is f:param and f:attribute expected to work within the tomahawk tree control? Here is my jsf code with both the commandLink and selectBooleanCheckBox. You can see I've changed the column controls to treeColumn, but this still doesn't seem to play a role in getting the right value from f:param or f:attribute. Is there some trick to getting the f:param or f:attribute to work or is this a bug in the tomahawk tree control?