PagingAgent"
From Documentation
Line 2: | Line 2: | ||
+ | __TOC__ | ||
+ | |||
+ | = Switch Pages = | ||
<tt> PagingAgent </tt> only works on ''' ''paging'' ''' component. When ''listbox'', ''gird'', and ''tree'' are in "paging" mold, they all have one ''paging'' component inside of them as the image shows: | <tt> PagingAgent </tt> only works on ''' ''paging'' ''' component. When ''listbox'', ''gird'', and ''tree'' are in "paging" mold, they all have one ''paging'' component inside of them as the image shows: | ||
Line 26: | Line 29: | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | =Supported Components= | ||
+ | |||
+ | {| border="1" | width="100%" | ||
+ | ! <center>Components</center> | ||
+ | ! <center>Version</center> | ||
+ | ! <center>Note</center> | ||
+ | |- | ||
+ | | Paging | ||
+ | | 5, 6 | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | |||
{{ZATSEssentialsPageFooter}} | {{ZATSEssentialsPageFooter}} |
Revision as of 03:13, 16 May 2012
Switch Pages
PagingAgent only works on paging component. When listbox, gird, and tree are in "paging" mold, they all have one paging component inside of them as the image shows:
You don't need to add paging component in a ZUL explicitly, because it's auto-created. Query it by selector syntax and convert it as PagingAgent to switch to a specific page. You should pass in a page index (start from zero) instead of page number (start from one).
The following code demonstrate the usage:
ComponentAgent paging = desktop.query("listbox > paging");
paging.as(PagingAgent.class).moveTo(1);
paging = desktop.query("grid > paging");
paging.as(PagingAgent.class).moveTo(1);
paging = desktop.query("tree > paging");
paging.as(PagingAgent.class).moveTo(1);
paging = desktop.query("paging");
paging.as(PagingAgent.class).moveTo(1);
Supported Components
Paging | 5, 6 |