View Full Version : Extending PagingToolBar

11 May 2010, 11:57 AM
I need to extend the PagingToolBar to let the user choose how many records he wants to see per page. I looked at the source code for PagingToolBar but could not find a way to add my 'ToolbarButton" objects to the PagingToolBar instance .. can anyone point in the right direction or reply back with pseudo code to do this ?

11 May 2010, 11:55 PM
Well, PagingToolBar extends ToolBar, so you have the add method in it...
If you need a new Button to be added, just use the add method.

For the page size itself, there is the setPageSize method.


12 May 2010, 8:11 AM
Thanks for your reply Michel. I am now able to get the functionality I needed (add control components that let the user select the number of rows he wants to view per page) by copying the entire code and adding my custom widgets to the code. I am doing this instead of extending the PagingToolBar because I need to add my widgets between the default widgets and I did not see a way to control the order in which I could add them by extending the PagingToolBar class. Does anyone know how to control the order in which the control components are added using the add() method ?

12 May 2010, 10:00 AM
My issue is resolved. I overlooked that the add() methods were within the constructor.