how to show the >> button in simpepager

31 views
Skip to first unread message

tong123123

unread,
Feb 2, 2012, 5:22:43 AM2/2/12
to Google Web Toolkit
I follow the example in
http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/cellview/client/SimplePager.html
and find that the last button >> is unenabled, so user need to step
page by page until the end.

I want to know how to enable the last button of simplepager?
I see the showcase source and there is one statement
// Create a Pager to control the table.
SimplePager.Resources pagerResources =
GWT.create(SimplePager.Resources.class);
pager = new SimplePager(TextLocation.CENTER, pagerResources,
false, 0, true);

I know the last parameter cause the last button to show, but what is
SimplePager.Resources? any example to create it? or could I pass a
null to it if I have not any SimplePager.Resources?

Thomas Broyer

unread,
Feb 2, 2012, 5:38:08 AM2/2/12
to google-we...@googlegroups.com


On Thursday, February 2, 2012 11:22:43 AM UTC+1, tong123123 wrote:
I follow the example in
http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/cellview/client/SimplePager.html
and find that the last button >> is unenabled, so user need to step
page by page until the end.

I want to know how to enable the last button of simplepager?
I see the showcase source and there is one statement
 // Create a Pager to control the table.
    SimplePager.Resources pagerResources =
GWT.create(SimplePager.Resources.class);
    pager = new SimplePager(TextLocation.CENTER, pagerResources,
false, 0, true);

I know the last parameter cause the last button to show, but what is
SimplePager.Resources?

 
any example to create it? or could I pass a
null to it if I have not any SimplePager.Resources?

Simply pass GWT.create(SimplePager.Resources.class), as in the Showcase sample code. 

tong123123

unread,
Feb 2, 2012, 11:09:29 AM2/2/12
to Google Web Toolkit
On Feb 2, 6:38 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Thursday, February 2, 2012 11:22:43 AM UTC+1, tong123123 wrote:
>
> > I follow the example in
>
> >http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/g...
> > and find that the last button >> is unenabled, so user need to step
> > page by page until the end.
>
> > I want to know how to enable the last button of simplepager?
> > I see the showcase source and there is one statement
> >  // Create a Pager to control the table.
> >     SimplePager.Resources pagerResources =
> > GWT.create(SimplePager.Resources.class);
> >     pager = new SimplePager(TextLocation.CENTER, pagerResources,
> > false, 0, true);
>
> > I know the last parameter cause the last button to show, but what is
> > SimplePager.Resources?
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/g...
>
> > any example to create it? or could I pass a
> > null to it if I have not any SimplePager.Resources?
>
> Simply pass GWT.create(SimplePager.Resources.class), as in the Showcase
> sample code.

thanks for the reply, but what is
SimplePager.Resources.class?
How to create this class?

Patrick Tucker

unread,
Feb 19, 2012, 11:43:36 PM2/19/12
to Google Web Toolkit
It is a ClientBundle which is an interface that defines the location
of images, CSS files, and what not. Google GWT ClientBundle, how to
create one is pretty well documented.

In your case, extend Resources and override anything that you want
different.
Reply all
Reply to author
Forward
0 new messages