Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Virtual table and select all items problem
Virtual table and select all items problem [message #699258] Thu, 21 July 2011 08:01 Go to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
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 [message #699276 is a reply to message #699258] Thu, 21 July 2011 08:42 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Aleks,
just compared the RAP/SWT TableItem#setChecked methods. I think that
this is a bug in RAP, because in SWT calling TableItem#setChecked cached
the item, but not in RAP.
Would you mind to open a bugzilla about it.
Thanks,
Ivan

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 [message #699321 is a reply to message #699258] Thu, 21 July 2011 10:35 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 [message #699330 is a reply to message #699321] Thu, 21 July 2011 11:11 Go to previous messageGo to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
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 [message #699343 is a reply to message #699330] Thu, 21 July 2011 11:45 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
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 [message #699375 is a reply to message #699343] Thu, 21 July 2011 13:00 Go to previous messageGo to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
It appears to be rather simple solution as I see it.
I hope I didn't oversee something.

Hope that helps,
Aleks

On 21.7.2011 г. 14:45 ч., Ivan Furnadjiev wrote:
> Hi Aleks,
> sure... please attach a patch to the bug.
> Thanks,
> Ivan
Re: Virtual table and select all items problem still valid [message #699861 is a reply to message #699375] Fri, 22 July 2011 13:38 Go to previous messageGo to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
Hi Ivan,

I am sorry but oversaw i huge bit. The patch does not load the new table
rows checked. It was the fix attempt in my project that did that. I
think the bug is still valid, unless you have seen it working at your side.

I think of modifying the controls demo with 'select all' button for
testing such behavior.

Any suggestions?

Deep regrets,
Aleks



On 21.7.2011 г. 16:00 ч., Aleksandar Pavlov wrote:
> It appears to be rather simple solution as I see it.
> I hope I didn't oversee something.
Re: Virtual table and select all items problem still valid [message #699868 is a reply to message #699861] Fri, 22 July 2011 13:59 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Aleks,
did you check your code in RCP? Does it work there? If you could provide
a patch for Controls Demo that demonstrate the problem will be great. If
your code works in RCP fill free to open a bugzilla and attach the
Controls Demo demonstration patch there.
Best,
Ivan

On 7/22/2011 4:38 PM, Aleksandar Pavlov wrote:
> Hi Ivan,
>
> I am sorry but oversaw i huge bit. The patch does not load the new table
> rows checked. It was the fix attempt in my project that did that. I
> think the bug is still valid, unless you have seen it working at your side.
>
> I think of modifying the controls demo with 'select all' button for
> testing such behavior.
>
> Any suggestions?
>
> Deep regrets,
> Aleks
>
>
>
> On 21.7.2011 г. 16:00 ч., Aleksandar Pavlov wrote:
>> It appears to be rather simple solution as I see it.
>> I hope I didn't oversee something.
Re: Virtual table and select all items problem still valid [message #699905 is a reply to message #699861] Fri, 22 July 2011 14:43 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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


On 7/22/2011 4:38 PM, Aleksandar Pavlov wrote:
> Hi Ivan,
>
> I am sorry but oversaw i huge bit. The patch does not load the new table
> rows checked. It was the fix attempt in my project that did that. I
> think the bug is still valid, unless you have seen it working at your side.
>
> I think of modifying the controls demo with 'select all' button for
> testing such behavior.
>
> Any suggestions?
>
> Deep regrets,
> Aleks
>
>
>
> On 21.7.2011 г. 16:00 ч., Aleksandar Pavlov wrote:
>> It appears to be rather simple solution as I see it.
>> I hope I didn't oversee something.
Re: Virtual table and select all items problem still valid [message #701656 is a reply to message #699905] Mon, 25 July 2011 11:36 Go to previous messageGo to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
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 #701810 is a reply to message #701656] Mon, 25 July 2011 16:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
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
Re: Virtual table and select all items problem still valid [message #702589 is a reply to message #701810] Tue, 26 July 2011 14:42 Go to previous message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
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
Previous Topic:[GEF] Thumbnail + direct edit issues
Next Topic:New RAP timeout message
Goto Forum:
  


Current Time: Fri Apr 19 21:47:00 GMT 2024

Powered by FUDForum. Page generated in 0.03188 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top