Home » Eclipse Projects » Remote Application Platform (RAP) » Implement Sorter/Comparator with VirtualTable and DeferredContentProvider
|
Re: Implement Sorter/Comparator with VirtualTable and DeferredContentProvider [message #80095 is a reply to message #80077] |
Mon, 31 March 2008 07:58 |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
See the excerpt of the TableViewer JavaDoc:
* As of 3.1 the TableViewer now supports the SWT.VIRTUAL flag. If the
* underlying table is SWT.VIRTUAL, the content provider may implement
* {@link ILazyContentProvider} instead of {@link
IStructuredContentProvider}.
* Note that in this case, the viewer does not support sorting or
filtering.
Ciao
Frank
-----Ursprüngliche Nachricht-----
Von: Arpit Desai [mailto:arpitdesai23@gmail.com]
Bereitgestellt: Montag, 31. März 2008 09:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Implement Sorter/Comparator with VirtualTable and
DeferredContentProvider
Betreff: Implement Sorter/Comparator with VirtualTable and
DeferredContentProvider
Hello Guys,
I am having trouble implementing a sorter with a VirtualTable and a
content provider which either extends from DeferredContentProvider or
implements ILazyContentProvider.
The problem is the compare method of the defined sorter never gets
invoked with ILazyContentProvider. I put some debug statements and on
clicking on Columnheader I get as far as setting the sort direction and
also setting the Sorter for that column but the compare of the
Sorter(which extends ViewerComparator) never gets invoked even when the
viewer is refreshed.
Please help me out with Ideas/Examples.
Also, if there are examples make it for more than one column in the
table. The single column examples out on the web are very confusing and
don't work for multiple columns.
Thanks,
Arpit
|
|
| |
Re: Implement Sorter/Comparator with VirtualTable and DeferredContentProvider [message #80392 is a reply to message #80140] |
Mon, 31 March 2008 15:10 |
Arpit Desai Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Hello Frank/Tom,
Thanks for replying to my message. I had missed the "Note" on Java-docs,
honestly.
Tom,
I am keen on sorting the visible section of elements at-least, is this
possible using DeferredContentProvider and BackgroundContentProvider ?
I was going through the implementation in class
BackgroundContentProvider and it looked doable.
In my project I had MyContentProvider extend from
DeferredContentProvider and the model object implement IConcurrentModel
interface, however, I did not understand the flow of control in this
scenario.
If this type of sorting is supported with RAP 1.0 than please give me an
example to understand it.
Thank you again,
Arpit
Tom Schindl wrote:
> Frank is right. In 3.2 we didn't support filtering/sorting in case of
> VIRTUAL-Tables no matter which content-provider you used. As of 3.3 we
> only support sorting/filtering when using a IStructuredContentProvider
> because the viewer and sorter implementation assumes to have the
> complete model available.
>
> If you are doing everything lazily you need to implement this your own,
> sorry. If you have an idea how to implement it for lazy cases we are
> open to discuss it because it is an often requested feature.
>
> Tom
>
> Frank Appel schrieb:
>> Hi,
>>
>> See the excerpt of the TableViewer JavaDoc:
>>
>> * As of 3.1 the TableViewer now supports the SWT.VIRTUAL flag. If the
>> * underlying table is SWT.VIRTUAL, the content provider may implement
>> * {@link ILazyContentProvider} instead of {@link
>> IStructuredContentProvider}.
>> * Note that in this case, the viewer does not support sorting or
>> filtering.
>>
>> Ciao
>> Frank
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Arpit Desai [mailto:arpitdesai23@gmail.com]
>> Bereitgestellt: Montag, 31. März 2008 09:46
>> Bereitgestellt in: eclipse.technology.rap
>> Unterhaltung: Implement Sorter/Comparator with VirtualTable and
>> DeferredContentProvider
>> Betreff: Implement Sorter/Comparator with VirtualTable and
>> DeferredContentProvider
>>
>>
>> Hello Guys,
>>
>> I am having trouble implementing a sorter with a VirtualTable and a
>> content provider which either extends from DeferredContentProvider or
>> implements ILazyContentProvider.
>>
>> The problem is the compare method of the defined sorter never gets
>> invoked with ILazyContentProvider. I put some debug statements and on
>> clicking on Columnheader I get as far as setting the sort direction and
>> also setting the Sorter for that column but the compare of the
>> Sorter(which extends ViewerComparator) never gets invoked even when the
>> viewer is refreshed.
>>
>> Please help me out with Ideas/Examples.
>>
>> Also, if there are examples make it for more than one column in the
>> table. The single column examples out on the web are very confusing and
>> don't work for multiple columns.
>>
>> Thanks,
>>
>> Arpit
>>
>
>
|
|
|
Re: Implement Sorter/Comparator with VirtualTable and DeferredContentProvider [message #80527 is a reply to message #80392] |
Tue, 01 April 2008 07:26 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi,
regarding your question if this works with RAP 1.0: the
DeferredContentProvider and friends are plain copies from the 3.3
RCP-JFace code and thus should work as their original counterpart.
The underlying Table widget received many bug fixes over the last
months. Therefore I recommend using the most recent milestone (1.1
M2) or even better CVS HEAD.
Cheers,
Rüdiger
Arpit Desai wrote:
> Hello Frank/Tom,
>
> Thanks for replying to my message. I had missed the "Note" on Java-docs,
> honestly.
>
> Tom,
> I am keen on sorting the visible section of elements at-least, is this
> possible using DeferredContentProvider and BackgroundContentProvider ?
>
> I was going through the implementation in class
> BackgroundContentProvider and it looked doable.
>
> In my project I had MyContentProvider extend from
> DeferredContentProvider and the model object implement IConcurrentModel
> interface, however, I did not understand the flow of control in this
> scenario.
>
> If this type of sorting is supported with RAP 1.0 than please give me an
> example to understand it.
>
> Thank you again,
>
> Arpit
>
> Tom Schindl wrote:
>> Frank is right. In 3.2 we didn't support filtering/sorting in case of
>> VIRTUAL-Tables no matter which content-provider you used. As of 3.3 we
>> only support sorting/filtering when using a IStructuredContentProvider
>> because the viewer and sorter implementation assumes to have the
>> complete model available.
>>
>> If you are doing everything lazily you need to implement this your
>> own, sorry. If you have an idea how to implement it for lazy cases we
>> are open to discuss it because it is an often requested feature.
>>
>> Tom
>>
>> Frank Appel schrieb:
>>> Hi,
>>>
>>> See the excerpt of the TableViewer JavaDoc:
>>>
>>> * As of 3.1 the TableViewer now supports the SWT.VIRTUAL flag. If the
>>> * underlying table is SWT.VIRTUAL, the content provider may implement
>>> * {@link ILazyContentProvider} instead of {@link
>>> IStructuredContentProvider}.
>>> * Note that in this case, the viewer does not support sorting or
>>> filtering.
>>>
>>> Ciao
>>> Frank
>>>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Arpit Desai [mailto:arpitdesai23@gmail.com]
>>> Bereitgestellt: Montag, 31. März 2008 09:46
>>> Bereitgestellt in: eclipse.technology.rap
>>> Unterhaltung: Implement Sorter/Comparator with VirtualTable and
>>> DeferredContentProvider
>>> Betreff: Implement Sorter/Comparator with VirtualTable and
>>> DeferredContentProvider
>>>
>>>
>>> Hello Guys,
>>>
>>> I am having trouble implementing a sorter with a VirtualTable and a
>>> content provider which either extends from DeferredContentProvider or
>>> implements ILazyContentProvider.
>>>
>>> The problem is the compare method of the defined sorter never gets
>>> invoked with ILazyContentProvider. I put some debug statements and on
>>> clicking on Columnheader I get as far as setting the sort direction and
>>> also setting the Sorter for that column but the compare of the
>>> Sorter(which extends ViewerComparator) never gets invoked even when the
>>> viewer is refreshed.
>>>
>>> Please help me out with Ideas/Examples.
>>>
>>> Also, if there are examples make it for more than one column in the
>>> table. The single column examples out on the web are very confusing and
>>> don't work for multiple columns.
>>>
>>> Thanks,
>>>
>>> Arpit
>>>
>>
>>
|
|
|
Re: Implement Sorter/Comparator with VirtualTable and DeferredContentProvider [message #80703 is a reply to message #80527] |
Tue, 01 April 2008 15:19 |
Arpit Desai Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Ok Thanks Rudiger, I will take the latest from CVS-HEAD.
Arpit
Rüdiger Herrmann wrote:
> Hi,
>
> regarding your question if this works with RAP 1.0: the
> DeferredContentProvider and friends are plain copies from the 3.3
> RCP-JFace code and thus should work as their original counterpart. The
> underlying Table widget received many bug fixes over the last months.
> Therefore I recommend using the most recent milestone (1.1 M2) or even
> better CVS HEAD.
>
> Cheers,
> Rüdiger
>
> Arpit Desai wrote:
>> Hello Frank/Tom,
>>
>> Thanks for replying to my message. I had missed the "Note" on
>> Java-docs, honestly.
>>
>> Tom,
>> I am keen on sorting the visible section of elements at-least, is this
>> possible using DeferredContentProvider and BackgroundContentProvider ?
>>
>> I was going through the implementation in class
>> BackgroundContentProvider and it looked doable.
>>
>> In my project I had MyContentProvider extend from
>> DeferredContentProvider and the model object implement
>> IConcurrentModel interface, however, I did not understand the flow of
>> control in this scenario.
>>
>> If this type of sorting is supported with RAP 1.0 than please give me
>> an example to understand it.
>>
>> Thank you again,
>>
>> Arpit
>>
>> Tom Schindl wrote:
>>> Frank is right. In 3.2 we didn't support filtering/sorting in case of
>>> VIRTUAL-Tables no matter which content-provider you used. As of 3.3
>>> we only support sorting/filtering when using a
>>> IStructuredContentProvider because the viewer and sorter
>>> implementation assumes to have the complete model available.
>>>
>>> If you are doing everything lazily you need to implement this your
>>> own, sorry. If you have an idea how to implement it for lazy cases we
>>> are open to discuss it because it is an often requested feature.
>>>
>>> Tom
>>>
>>> Frank Appel schrieb:
>>>> Hi,
>>>>
>>>> See the excerpt of the TableViewer JavaDoc:
>>>>
>>>> * As of 3.1 the TableViewer now supports the SWT.VIRTUAL flag. If the
>>>> * underlying table is SWT.VIRTUAL, the content provider may implement
>>>> * {@link ILazyContentProvider} instead of {@link
>>>> IStructuredContentProvider}.
>>>> * Note that in this case, the viewer does not support sorting or
>>>> filtering.
>>>>
>>>> Ciao
>>>> Frank
>>>>
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Arpit Desai [mailto:arpitdesai23@gmail.com]
>>>> Bereitgestellt: Montag, 31. März 2008 09:46
>>>> Bereitgestellt in: eclipse.technology.rap
>>>> Unterhaltung: Implement Sorter/Comparator with VirtualTable and
>>>> DeferredContentProvider
>>>> Betreff: Implement Sorter/Comparator with VirtualTable and
>>>> DeferredContentProvider
>>>>
>>>>
>>>> Hello Guys,
>>>>
>>>> I am having trouble implementing a sorter with a VirtualTable and a
>>>> content provider which either extends from DeferredContentProvider or
>>>> implements ILazyContentProvider.
>>>>
>>>> The problem is the compare method of the defined sorter never gets
>>>> invoked with ILazyContentProvider. I put some debug statements and on
>>>> clicking on Columnheader I get as far as setting the sort direction and
>>>> also setting the Sorter for that column but the compare of the
>>>> Sorter(which extends ViewerComparator) never gets invoked even when the
>>>> viewer is refreshed.
>>>>
>>>> Please help me out with Ideas/Examples.
>>>>
>>>> Also, if there are examples make it for more than one column in the
>>>> table. The single column examples out on the web are very confusing and
>>>> don't work for multiple columns.
>>>>
>>>> Thanks,
>>>>
>>>> Arpit
>>>>
>>>
>>>
>
|
|
|
Goto Forum:
Current Time: Sat Apr 27 05:15:45 GMT 2024
Powered by FUDForum. Page generated in 0.03173 seconds
|