Home » Eclipse Projects » Remote Application Platform (RAP) » Virtual table and select all items problem
| | | |
Re: Virtual table and select all items problem [message #699343 is a reply to message #699330] |
Thu, 21 July 2011 11:45 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Aleks,
sure... please attach a patch to the bug.
Thanks,
Ivan
On 7/21/2011 2:11 PM, Aleksandar Pavlov wrote:
> Hi Ivan,
>
> Do you accept source code contributions?
>
> Aleks
>
>
> On 21.7.2011 г. 13:35 ч., Ivan Furnadjiev wrote:
>> Bug opened:
>> 352722: [Table] TableItem#setChecked and TableItem#setGrayed don't cache
>> the virtual item
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=352722
>>
>> On 7/21/2011 11:01 AM, Aleksandar Pavlov wrote:
>>> 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 16:08 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
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
|
|
| |
Goto Forum:
Current Time: Fri Apr 19 21:47:00 GMT 2024
Powered by FUDForum. Page generated in 0.03188 seconds
|