on 09-29-2005 6:09 PM
Hi,
I have a tree displaying a heirarchy. This tree should have a facility of selecting multiple rows. To do this, I used the method that is most recommended, i.e. to have 2 images, one for each state of a checkbox and toggle betwwen the 2 on the onSelect event.
This is working fine except one minute detail. The onSelect should be triggered only with the item of the tree is selected and not when I click the expand/collapse image (triangle) at the side of each node. This works fine on clicking expand, i.e. the onSelect is not triggered, but on clicking collapse, the onSelect is triggered.
This is very annoying since if a user has expanded a node by mistake and has to collapse that node, the onSelect also gets fired and the state gets toggled.
Has anyone else also noticed this? I am using SP11, donno if this has been fixed in a future release.
Nirav
get reference of your node type in doModifyView() method assign the
reference to a public static variable
public static IWDTreeNodeType nodeType;
nodeType = (IWDTreeNodeType) view.getElement("Node");
in the onAction event method
check whether it is expanded.
if (nodeType.getExpanded())
handle ur code accordingly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
set ignoreAction property of tree node to true.
I hope it ll help u.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nirav,
I suppose this is a problem on your side. Because i have never come across this problem till now. Just set ignoreAction as true for all the 'parent nodes' (i.e nodes which have atleast a child) and as false for all the leaf nodes. Write the code for loading the children in your 'onLoadChildren'. This will be invoked the first time, you click on expand icon. After this, as far as I know, any click on the expand collapse button doesn't have any effect on the data being populated.
Best regards,
Nibu.
Hi Nibu,
I am using a recursive node for the tree.
I have to implement a multiple selection on the entire tree. I am doing this with a checkbox image logic as I have explained before. Also, all nodes in my tree are to be selectable. It can be a parent node (i.e nodes which have atleast a child) or a child node. So, as I said in my previous reply, I cannot set the ignoreAction to false because I need the parent node also to be selectable.
Nirav
Hi Nirav,
I'm sorry for not understanding your scenario properly. Generally when we use tree, we associate actions only to the leaf nodes. Even if we associate actions to parent nodes, those will be usually expand collapse action, which we need to handle inside the onSelect action. It felt very strange to hear about this problem, so I tried out your scenario and it surely looks like a bug. And in this case we cannot have any workarounds too, because the triggering is being handled internally and they are triggering the 'onSelect' action on 'collapse' event too. So, as such there is no solution for your problem
Best Regards,
Nibu.
get reference of your node type in doModifyView() method assign the
reference to a public static variable
public static IWDTreeNodeType nodeType;
nodeType = (IWDTreeNodeType) view.getElement("Node");
in the onAction event method
check whether it is expanded.
if (nodeType.getExpanded())
handle ur code accordingly
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.