Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Pagination control with Tableviewer
Pagination control with Tableviewer [message #79211] Wed, 26 March 2008 04:39 Go to next message
Arpit Desai is currently offline Arpit DesaiFriend
Messages: 25
Registered: July 2009
Junior Member
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 #79224 is a reply to message #79211] Wed, 26 March 2008 04:51 Go to previous messageGo to next message
Arpit Desai is currently offline Arpit DesaiFriend
Messages: 25
Registered: July 2009
Junior Member
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 ?
Re: Pagination control with Tableviewer [message #79298 is a reply to message #79224] Wed, 26 March 2008 16:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

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 ?
Re: Pagination control with Tableviewer [message #79386 is a reply to message #79298] Thu, 27 March 2008 06:23 Go to previous message
Arpit Desai is currently offline Arpit DesaiFriend
Messages: 25
Registered: July 2009
Junior Member
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 ?
Previous Topic:How to migrate my RCP Application to a RAP Application
Next Topic:Browser memory leak?
Goto Forum:
  


Current Time: Fri Apr 19 05:25:48 GMT 2024

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

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

Back to the top