0

Listbox mold paging

asked 2012-05-15 18:43:42 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

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

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2012-05-15 18:55:25 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2012-05-15 19:01:22 +0800

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

link publish delete flag offensive edit

answered 2012-05-16 13:32:38 +0800

Saahithi gravatar image Saahithi
6

Hey.... Even I am looking for this type of paging with listbox.... I will try it... Thank you...

link publish delete flag offensive edit

answered 2012-05-16 13:40:25 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

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.

link publish delete flag offensive edit

answered 2012-05-16 15:57:58 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2012-05-16 16:51:02 +0800

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.

link publish delete flag offensive edit

answered 2012-05-17 02:35:20 +0800

vincentjian gravatar image vincentjian
2245 6

updated 2012-05-17 02:36:54 +0800

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-05-15 18:43:42 +0800

Seen: 489 times

Last updated: May 17 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More