-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
If we use listbox paging mold, zk automatically create a bar and put the paging button in that. Apart from that, can we some more components in that bar,
say for example, button or drop down
I have such a thing do with a separated paging component. Zul codes are attached. Pic here.
<borderlayout id="borderLayout_ManagerUserList"> <north border="none" height="26px"> <div sclass="z-toolbar" style="padding:0"> <hbox pack="start" sclass="hboxRemoveWhiteStrips" width="100%"> <toolbar align="start" style="float:left; border-style: normal;"> <toolbarbutton id="btnCustomizeList" image="/images/icons/table_16x16.png" tooltiptext="${c:l('btnCustomizeList.tooltiptext')}" ></toolbarbutton> <separator orient="vertical" ></separator> </toolbar> <toolbar align="start" style="float:left; border-style: none;"> <paging id="paging_ManagerUserList" width="300px" ></paging> </toolbar> <toolbar align="end" style="float:right; border-style: none;"> </toolbar> </hbox> </div> </north> <center border="none"> <listbox id="listBoxManagerUser" model="@{controller.managerUsers}" selectedItem="@{controller.selectedManagerUser}" multiple="false" tooltiptext="${c:l('listbox.tooltiptext')}" vflex="1" hflex="1"> <listhead sizable="true"> <listheader id="lh_ManagerUserList_Loginname" sclass="FDListBoxHeader1" image="/images/icons/create_doc_16x16.gif" sort="auto" width="15%" label="${c:l('common.Login.Name')}" ></listheader> <listheader id="lh_ManagerUserList_Lastname" sclass="FDListBoxHeader1" image="/images/icons/create_doc_16x16.gif" sort="auto" width="15%" label="${c:l('common.LastName')}" ></listheader> <listheader id="lh_ManagerUserList_SystemAdmin" sclass="FDListBoxHeader1"> <label value="${c:l('common.Admin.System.Wrapped')}" width="85%" sclass="word-wrap" multiline="true" ></label> </listheader> <listheader id="lh_ManagerUserList_Email" sclass="FDListBoxHeader1" image="/images/icons/mail16x16.gif" sort="auto" width="20%" label="${c:l('common.Email')}" ></listheader> <listheader id="lh_ManagerUserList_Enabled" sclass="FDListBoxHeader1"> <label value="${c:l('common.Enabled')}" width="85%" sclass="word-wrap" multiline="true" ></label> </listheader> <listheader id="lh_ManagerUserList_Accountnonexpired" sclass="FDListBoxHeader1" sort="auto"> <label value="${c:l('common.Accountnonexpired')}" width="85%" sclass="word-wrap" multiline="true" ></label> </listheader> <listheader id="lh_ManagerUserList_Credentialsnonexpired" sclass="FDListBoxHeader1" sort="auto"> <label value="${c:l('common.Credentialsnonexpired')}" width="85%" sclass="word-wrap" multiline="true" ></label> </listheader> <listheader id="lh_ManagerUserList_Accountnonlocked" sclass="FDListBoxHeader1" sort="auto"> <label value="${c:l('common.Accountnonlocked')}" width="85%" sclass="word-wrap" multiline="true" ></label> </listheader> </listhead> <listitem self="@{each='managerUser'}" value="@{managerUser}" forward="onDoubleClick=onDoubleClickedManagerUserItem"> <listcell label="@{managerUser.loginname}" style="padding-left: 5px" ></listcell> <listcell label="@{managerUser.lastname}" style="padding-left: 5px" ></listcell> <listcell style="text-align: center;"> <checkbox checked="@{managerUser.systemAdmin}" disabled="true" ></checkbox> </listcell> <listcell label="@{managerUser.email}" style="padding-left: 5px" ></listcell> <listcell style="text-align: center;"> <checkbox checked="@{managerUser.enabled}" disabled="true" ></checkbox> </listcell> <listcell style="text-align: center;"> <checkbox checked="@{managerUser.accountnonexpired}" disabled="true" ></checkbox> </listcell> <listcell style="text-align: center;"> <checkbox checked="@{managerUser.credentialsnonexpired}" disabled="true" ></checkbox> </listcell> <listcell style="text-align: center;"> <checkbox checked="@{managerUser.accountnonlocked}" disabled="true" ></checkbox> </listcell> </listitem> </listbox> </center> </borderlayout>
best
Stephan
Hi terrytornado
Thank you very much. I tried your example after removing all the label and tool tip text dependencies.
Then finally, i came to know that you are using custom pagination component to resolve the issue.
I thing, if we use custom pagination component, then we need to write the code for paging navigation. Correct me if i am wrong.
But i am sorry, in our case for the release one, we decided to use in built pagination by setting the mold property to "paging".
Can we add some components in the paging mold of the list item without using custom pagination control.
Anyway, thank you very much for prompt reply.
Sure, i have write it in my first line. My try with adding something next the inplace paging component failed.
Please post it if you have solve this.
best
Stephan
PS: Writing an own paging mechanism who works against the database is recommended. Look here and the pervious article for informations.
Wrtiting an own simple database paging method is easy. You can find codes for it (Hibernate dependend) in the extended SeaarchListbox for branches in the Zksample2 codes.
Hi Senthilchettyin,
You can put paging component anywhere for listbox paging mold with "paginal" attribute as follows:
<zk> <zscript> Object[] o = new Object[50]; </zscript> <toolbar> <hlayout sclass="z-valign-middle"> <toolbarbutton label="other button 1"></toolbarbutton> <paging id="pagenavi" pageSize="10"></paging> <toolbarbutton label="other button 2"></toolbarbutton> </hlayout> </toolbar> <listbox id="listbox" mold="paging" paginal="${pagenavi}"> <listhead> <listheader label="name"></listheader> </listhead> <listitem forEach="${o}"> <listcell label="item ${forEachStatus.index}" /> </listitem> </listbox> </zk>
Hope it can give you some hint.
Asked: 2012-05-15 18:43:42 +0800
Seen: 489 times
Last updated: May 17 '12