cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Selection in Table / Context

detlev_beutner
Active Contributor
0 Kudos
192

Hi there,

the following problem seems to be a bug:

Create a table, selectionMode auto or multi, with a context bound to it with cardinality and selection 0..n.

When the table shows up the first time (and there are some lines filled), the first row seems to be selected (orange, not yellow). If you press a button and ask all elements in the action method if they are multiselected, this is false for all!

If instead you click on the first element (not on the checkbox, but on the content), the element you click on gets focus, and now, clicking the button, you see that this element is selected - even if there is no difference in the visual selection state.

Additional remark: Within the IWDNode API I would expect the methods:

- Iterator getMultiSelectedElements()

- void multiSelectAll()

Thanks in advance

Detlev

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Detlev,

The first line has the Lead Selection, because you set the node "initializeLeadSelection = true". The multiple selection is initially empty. Lead Selection overwrites the multiple selection (visually spoken). A click into the table sets Lead and multiple Selection at the same time on the line.

The solution would be: set "initializeLeadSelection = false" or alternatively you would instead of calling IWDNode.isMultiSelected(i) simply call IWDNode.isSelected(i).

Hope that helps!

Karin

detlev_beutner
Active Contributor
0 Kudos

Hi Karin,

thanks for your answer. Nevertheless, questions stay open:

1.) I have changed initializeLeadSelection to false. This leads to a correct initial displaying of the table. Open question/remark: This should be documented much butter in the doc's (searching for "initializeLeadSelection" leads to exactly one result).

2.) The need for better documenting this is double for "isSelected" being deprecated.

3.) After the initial display, if a row is selected (orange, meaning leadSelected!?), the problem reoccurs: If I choose a row and press the button, and than remove this element from the node, the next element gets lead selected. For this, I have added a .clearSelection(), which should clear the lead selection, too. But it does not. At least this seems to be a bug for me? (As a workaround, explicitely setting the lead selection to NO_SELECTION works).

Let's aggregate open issues:

- much better documentation of parameter

initializeLeadSelection (also at table's doc/examples)

- correct implementation or documentation on method

clearSelection()

- add methods as suggested above (at least the iterator,

which really is a must)

Should I open a message for these or can you forward the requests directly?

Thanks in advance

Detlev

Former Member
0 Kudos

Hi Detlev,

I will forward your open issues!

Thanks very much for your very helpful input!

Best Regards,

Karin