Sencha ( formerly ExtJS ) has a cool paging toolbar at the bottom of their Grid List component. There are sometimes scenarios that I want to pass values, lets say ID or search terms, for the next/previous page to retrieve. Sadly the buttons ( First, Previous, Next, Last and Refresh ) does not have any onClick event handlers to initialize the parameters before sending to the database. The only thing close to handling this requirement that I found is that you have to set a listener for the beforechange event under Ext.PagingToolbar to initialize the parameters and values before the component sends the data to the server. This way any variables can be set before sending.
The variables that are sent to the server is normally start and limit, what if I want to add a filter to the query? One way is adding baseParams to your data store and change their value using setBaseParam when the beforechange event is fired.
Sample code below.