Hi,
I need to add a checkbox into a table by a generated cell, what i need is to use the checkbox to select the rows.
My selection, can also store record that are not into the table.
Just an example.
I show some data into the table, i select some of them
Than i load some other data and select some other.
At the end i need to know wich rows are selected in all the table.
Some ideas
At the moment i use the code attached, but i dont like too mutch.
Thanks for help.
public void select(Object itemId) {
if (!isMultiSelect()) {
setValue(itemId);
} else if (!isSelected(itemId) && itemId != null && items.containsId(itemId)) {
final Set<Object> s = new HashSet<Object>((Set<?>) getValue());
s.add(itemId);
setValue(s);
}
refreshRowCache();
}