|
Re: TableViewer with SWT.CHECK [message #30052 is a reply to message #29596] |
Fri, 01 June 2007 10:06 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Stefan,
each TableItem has a getChecked() method to read its checked state. The
SelectionEvent fired by the Table will inform you about changes. The
detail field is set to SWT.CHECK in this case.
You can find more information in the JavaDoc.
Hope that helps,
Rüdiger
Stefan Röck wrote:
> I created a new TableViewer with styles SWT.CHECK and SWT.MULTI. Displaying
> the table works fine. The question is how can I retrieve the checked table
> rows?
>
> TableViewer#getSelection only returns selected but not checked items. Any
> idea?
> Stefan.
>
>
|
|
|
|
Re: TableViewer with SWT.CHECK [message #30479 is a reply to message #30265] |
Fri, 01 June 2007 17:46 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Stefan,
as long as you don't add a SelectionListener there are not extra
rountrips. The state is kept in the TableItem in any case. Thus
iterating over all items and asking getChecked() will give you the
current checked state.
Cheers,
Rüdiger
Stefan Röck wrote:
> Hallo Rüdiger,
>
> but this means that everytime the user checks/unchecks an item a
> serverroundtrip is performed and I have to keep the state in my application
> logic, correct? If so, although in SWT this might be a practical solution,
> one might run into serious performance issues in RAP (there is a similar
> problem with VerifyListeners, for instance).
>
> Can you think of a more server-friendly RAP-specific solution (e.g. offering
> a method TableViewer#getCheckedItems())?
>
> Regards,
> Stefan.
>
> "Rüdiger Herrmann" <rherrmann@innoopract.com> schrieb im Newsbeitrag
> news:f3or4g$i3c$1@build.eclipse.org...
>> Stefan,
>>
>> each TableItem has a getChecked() method to read its checked state. The
>> SelectionEvent fired by the Table will inform you about changes. The
>> detail field is set to SWT.CHECK in this case.
>> You can find more information in the JavaDoc.
>>
>> Hope that helps,
>> Rüdiger
>>
>> Stefan Röck wrote:
>>> I created a new TableViewer with styles SWT.CHECK and SWT.MULTI.
>>> Displaying the table works fine. The question is how can I retrieve the
>>> checked table rows?
>>>
>>> TableViewer#getSelection only returns selected but not checked items. Any
>>> idea?
>>> Stefan.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03210 seconds