Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/PagingToolbar.html view on Meta::CPAN
{@link Ext.data.JsonReader#totalProperty totalProperty}: 'results',
...
}),
...
});
var myPageSize = 25; // server script should only send back 25 items at a time
var grid = new Ext.grid.GridPanel({
...
store: myStore,
bbar: new Ext.PagingToolbar({
{@link #store}: myStore, // grid and PagingToolbar using same store
{@link #displayInfo}: true,
{@link #pageSize}: myPageSize,
{@link #prependButtons}: true,
items: [
'text 1'
]
})
});
* </code></pre>
*
* <p>To use paging, pass the paging requirements to the server when the store is first loaded.</p>
* <pre><code>
store.load({
params: {
// specify params for the first page load if using paging
start: 0,
limit: myPageSize,
// other params
foo: 'bar'
}
});
* </code></pre>
*
* <p>If using {@link Ext.data.Store#autoLoad store's autoLoad} configuration:</p>
* <pre><code>
var myStore = new Ext.data.Store({
{@link Ext.data.Store#autoLoad autoLoad}: {params:{start: 0, limit: 25}},
...
});
* </code></pre>
*
* <p>The packet sent back from the server would have this form:</p>
* <pre><code>
{
"success": true,
"results": 2000,
"rows": [ // <b>*Note:</b> this must be an Array
{ "id": 1, "name": "Bill", "occupation": "Gardener" },
{ "id": 2, "name": "Ben", "occupation": "Horticulturalist" },
...
{ "id": 25, "name": "Sue", "occupation": "Botanist" }
]
}
* </code></pre>
* <p><u>Paging with Local Data</u></p>
* <p>Paging can also be accomplished with local data using extensions:</p>
* <div class="mdetail-params"><ul>
* <li><a href="http://extjs.com/forum/showthread.php?t=71532">Ext.ux.data.PagingStore</a></li>
* <li>Paging Memory Proxy (examples/ux/PagingMemoryProxy.js)</li>
* </ul></div>
* @constructor Create a new PagingToolbar
* @param {Object} config The config object
* @xtype paging
*/
(function() {
var T = Ext.Toolbar;
Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
<span id='Ext-PagingToolbar-cfg-store'> /**
</span> * @cfg {Ext.data.Store} store
* The {@link Ext.data.Store} the paging toolbar should use as its data source (required).
*/
<span id='Ext-PagingToolbar-cfg-displayInfo'> /**
</span> * @cfg {Boolean} displayInfo
* <tt>true</tt> to display the displayMsg (defaults to <tt>false</tt>)
*/
<span id='Ext-PagingToolbar-cfg-pageSize'> /**
</span> * @cfg {Number} pageSize
* The number of records to display per page (defaults to <tt>20</tt>)
*/
pageSize : 20,
<span id='Ext-PagingToolbar-cfg-prependButtons'> /**
</span> * @cfg {Boolean} prependButtons
* <tt>true</tt> to insert any configured <tt>items</tt> <i>before</i> the paging buttons.
* Defaults to <tt>false</tt>.
*/
<span id='Ext-PagingToolbar-cfg-displayMsg'> /**
</span> * @cfg {String} displayMsg
* The paging status message to display (defaults to <tt>'Displaying {0} - {1} of {2}'</tt>).
* Note that this string is formatted using the braced numbers <tt>{0}-{2}</tt> as tokens
* that are replaced by the values for start, end and total respectively. These tokens should
* be preserved when overriding this string if showing those values is desired.
*/
displayMsg : 'Displaying {0} - {1} of {2}',
<span id='Ext-PagingToolbar-cfg-emptyMsg'> /**
</span> * @cfg {String} emptyMsg
* The message to display when no records are found (defaults to 'No data to display')
*/
emptyMsg : 'No data to display',
<span id='Ext-PagingToolbar-cfg-beforePageText'> /**
</span> * @cfg {String} beforePageText
* The text displayed before the input item (defaults to <tt>'Page'</tt>).
*/
beforePageText : 'Page',
<span id='Ext-PagingToolbar-cfg-afterPageText'> /**
</span> * @cfg {String} afterPageText
* Customizable piece of the default paging text (defaults to <tt>'of {0}'</tt>). Note that
* this string is formatted using <tt>{0}</tt> as a token that is replaced by the number of
* total pages. This token should be preserved when overriding this string if showing the
* total page count is desired.
*/
afterPageText : 'of {0}',
<span id='Ext-PagingToolbar-cfg-firstText'> /**
</span> * @cfg {String} firstText
* The quicktip text displayed for the first page button (defaults to <tt>'First Page'</tt>).
* <b>Note</b>: quick tips must be initialized for the quicktip to show.
*/
( run in 1.084 second using v1.01-cache-2.11-cpan-02777c243ea )