Virtual table and select all items problem [message #699258] |
Thu, 21 July 2011 04:01  |
Eclipse User |
|
|
|
Hi all,
I realize that this is most likely question to SWT group but let me
start with stating it here:
I have checkboxTableViewer(virtual). I added "select all" checkbox on
top. I use tableViewer#setAllChecked(boolean).
The problem is that only the preloaded table rows in the virtual table
are checked. If I scroll down the newly updated rows are not checked.
Do you know some solution to the described problem.
Thank you in advance,
Aleks
p.s.
I tried to write my own code to check the new rows but there is a
problem with the events order.
|
|
|
|
|
|
|
|
|
|
|
|
Re: Virtual table and select all items problem still valid [message #701810 is a reply to message #701656] |
Mon, 25 July 2011 12:08   |
Eclipse User |
|
|
|
Hi Aleks,
could you attach your single sourced demo project and the Controls Demo
changes here?
Best,
Ivan
On 7/25/2011 2:36 PM, Aleksandar Pavlov wrote:
> Hi Ivan,
>
> Thank you for the info.
> Interesting, I reproduced different behavior:
> In single-sourced project I added CheckBoxTableViewer in a view with
> data- and label- providers and 150 entries.
> The result in RAP is consistent (the bug discussed) but in RCP different
> thing happens (find the attached screen shot):
> All table rows are checked but the rows are not updated with contents on
> scroll down.
>
> So what do we do with this problem?
> - I send the single sourced demo project to see if I abuse the API somehow;
> - I write a 'select all' button in the RAP Controls demo in order to
> reproduce and verify the bug;
> - We ask RPC to fix that bug;
> - We fix the bug and propose solution to RCP;
>
> I am out of ideas.
>
> I will be glad to help you out with this issue,
> Aleks
>
>
> On 22.7.2011 г. 17:43 ч., Ivan Furnadjiev wrote:
>> Hi Aleks,
>> just checked in RCP and the behavior is the same with RAP - on
>> CheckboxTableViewer#setAllChecked( true ) only visible items are checked.
>> The code:
>> ---
>> public void setAllChecked(boolean state) {
>> TableItem[] children = getTable().getItems();
>> for (int i = 0; i< children.length; i++) {
>> TableItem item = children[i];
>> if (item.getData() != null) {
>> if (item.getChecked() != state)
>> item.setChecked(state);
>> }
>> }
>> }
>> ---
>> set the checked state only for the items that item.getData() is not
>> null. Virtual (hidden) items have null data.
>> HTH,
>> Ivan
|
|
|
Re: Virtual table and select all items problem still valid [message #702589 is a reply to message #701810] |
Tue, 26 July 2011 10:42  |
Eclipse User |
|
|
|
Hi Ivan,
Sure, I attach zip archive with the single-sourced demo.
I have no progress modifying the RAP demo, as it does not use
CheckboxTableViewer.
Hope that helps,
Aleks
On 25.7.2011 г. 19:08 ч., Ivan Furnadjiev wrote:
> Hi Aleks,
> could you attach your single sourced demo project and the Controls Demo
> changes here?
> Best,
> Ivan
|
|
|
Powered by
FUDForum. Page generated in 0.09203 seconds