Pagination control with Tableviewer [message #79211] |
Wed, 26 March 2008 00:39  |
Eclipse User |
|
|
|
Hi folks,
I am looking to create a componenet using tableviewer which will have
pagination controls and also buttons to export the data displayed in the
table as a csv/excel/html file.
I am using the SWT.Virtual style for creating the viewer and hence the
data is loaded on need per basis. However, how do I provide pagination
control?
I tried tableviewer.getTable().setTopIndex(0) and on clicking NEXT I set
it to tableviewer.getTable().setTopIndex(10). But the data does not
refresh in the table.
What am I missing? Any Ideas ...
Thanks,
Arpit
|
|
|
|
|
Re: Pagination control with Tableviewer [message #79386 is a reply to message #79298] |
Thu, 27 March 2008 02:23  |
Eclipse User |
|
|
|
Thanks Rudiger for getting back on this. I implemented it in a new
project and it works fine for me now :)
I am still very new to RAP and so take time to figure things out.
Arpit
Rüdiger Herrmann wrote:
> Hi Arpit,
>
> I tried to reproduce what you described, but all worked as expected.
> Could you provide some standalone code that reproduces the problem?
>
> Cheers,
> Rüdiger
>
> Arpit Desai wrote:
>> Arpit Desai wrote:
>>> Hi folks,
>>>
>>> I am looking to create a componenet using tableviewer which will have
>>> pagination controls and also buttons to export the data displayed in
>>> the table as a csv/excel/html file.
>>>
>>> I am using the SWT.Virtual style for creating the viewer and hence
>>> the data is loaded on need per basis. However, how do I provide
>>> pagination control?
>>>
>>> I tried tableviewer.getTable().setTopIndex(0) and on clicking NEXT I
>>> set it to tableviewer.getTable().setTopIndex(10). But the data does
>>> not refresh in the table.
>>>
>>> What am I missing? Any Ideas ...
>>>
>>> Thanks,
>>>
>>> Arpit
>>
>> Somehow I endup getting run time error as follows:
>>
>> Could not evaluate javascript response:
>>
>> 'undefined' is null or not an object
>>
>> org.eclipse.swt.EventUtil.suspendEventHandling();var req =
>> org.eclipse.swt.Request.getInstance();req.setRequestCounter(
>>
>> What I am doing is as follows:
>>
>> btNext.addSelectionListener(new SelectionAdapter(){
>> @Override
>> public void widgetSelected(SelectionEvent e) {
>> System.out.println("TopIndex:" +
>> enclosureViewer.getTable().getTopIndex());
>> enclosureViewer.getTable().setTopIndex(index + incr);
>> System.out.println("TopIndex after next:" +
>> enclosureViewer.getTable().getTopIndex());
>> enclosureViewer.refresh();
>> }
>> });
>>
>>
>> Is this a bug ?
|
|
|
Powered by
FUDForum. Page generated in 0.03024 seconds