You have to write the codes to control the pagination buttons as we require, i.e. First
Previous
1
2
3
4
5
Next
Last
.
We just take reference of that id i.e. bidLbx
and do coding. We need to get certain values and use those values to control the buttons.
This gives the current page no: bidLbx.getPaginal().getActivePage();
This gives the total number of rows: bidLbx.getPaginal().getTotalSize();
This sets the Page Size (i.e. no. of rows per page): bidLbx.getPaginal().setPageSize();
This gives the no. of pages: bidLbx.getPaginal().getPageCount();
and don't forget to disable the default paging.
<listbox id=”bidLbx” mold=”paging”>
...
<zscript>
<![CDATA[
bidLbx.getPagingChild().setVisible(false);
]]>
</zscript>
</listbox>
First button Example:
<button id="first" label="First" style="margin:10px; padding:5px;">
<attribute name="onClick">
<![CDATA[
bidLbx.getPaginal().setActivePage(0);
]]>
</attribute>
</button>
Dropdown perpage combobox:
<combobox id="pageSize" value="20" style="width:50px;" readonly="true">
<comboitem label="5"></comboitem>
<comboitem label="10"></comboitem>
<attribute name="onCreate">
<![CDATA[
String ps = pageSize.getValue();
int pSize = Integer.parseInt(ps);
bidLbx.getPaginal().setPageSize(pSize);
]]>
</attribute>
<attribute name="onChange">
<![CDATA[
String ps = pageSize.getValue();
int pSize = Integer.parseInt(ps);
bidLbx.getPaginal().setPageSize(pSize);
]]>
</attribute>
</combobox>
If you have still problem do comment.