I have created a tree-table and added checkbox to one of its column. Now i want to uncheck all the children of the clicked element.
I have tried it with getItemId’s but problem is, that i can’t get the id of currently checked element.
I have used the following code to get the row id of the clicked checkbox,
CheckBox ck = new CheckBox();
ck.setValue(true);
ck.setImmediate(true);
ck.setDebugId(Integer.toString(count));
count++;
I have actually set the debug id while i was creating the checkbox, so by this i have got the rowid and
by using valueChangeListener, i have unchecked/checked its all childrens.
I know its not the best way but still it works for me. Anyone got any better idea then please let me know.
Sure I will please let me know how you want to use checkbox. Do you want it in dropdown portion or you want to make a relationship for dropdown column to the checkbox column corresponding to each row as I have done it.