0

please help - how to bind data to Listbox use iterator in GenericForwardComposer ??????

asked 2013-01-10 09:43:48 +0800

zerocold gravatar image zerocold
128 1

I am new comer in ZK.

I have big problem, i can not show my db to Listbox

this is my controller:

public void onClick$searchButton1(Event event) throws InterruptedException {
List<SearchEj> persons = new ArrayList<SearchEj>();
SearchEjServices ejService = new SearchEjServices(null, null);
List<SearchEj> ls = ejService.findAll();
personModelList.addAll(ls);

theList.setModel(personModelList);
}

Zul:

<listbox id="theList" mold="paging"
pageSize="30" vflex="true" >
<listhead sizable="true">
<listheader label="ATM ID" sort="auto" />
<listheader label="Type" sort="auto" />
<listheader label="File Name" sort="auto" />
<listheader label="File Path" sort="auto" />
</listhead>
<listitem >
<listcell label="${each.sATMID}"></listcell>
<listcell label="${each.iTaskType}"></listcell>
<listcell label="${each.sEJFileName}"></listcell>
<listcell label="${each.sEJFilePath}"></listcell>
</listitem>
</listbox>


How can i fix it :( please help me

delete flag offensive retag edit

31 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-14 11:09:25 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Try Stephen Solution

link publish delete flag offensive edit
0

answered 2013-01-15 11:19:38 +0800

zerocold gravatar image zerocold
128 1

not i dont build project with Maven

link publish delete flag offensive edit
0

answered 2013-01-15 11:13:31 +0800

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

Be sure you have all needed jars in the project. I don't know how you build the project. With maven?

link publish delete flag offensive edit
0

answered 2013-01-15 10:15:42 +0800

zerocold gravatar image zerocold
128 1

I removed <template > and have another error:

HTTP Status 500 - java.lang.ClassNotFoundException: org.zkoss.bind.BindComposer

org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException: org.zkoss.bind.BindComposer

link publish delete flag offensive edit
0

answered 2013-01-15 10:13:40 +0800

zerocold gravatar image zerocold
128 1

I did as you told, but it the same :-s


Component definition not found: template : as It can not understand type : template in Listbox

link publish delete flag offensive edit
0

answered 2013-01-15 09:58:29 +0800

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

Make a Tomcat 'clean' and Tomcat 'clean working directory' and redeploy it again.

link publish delete flag offensive edit
0

answered 2013-01-15 09:54:37 +0800

zerocold gravatar image zerocold
128 1

updated 2013-01-15 09:55:48 +0800

Hi terrytornado

i have error again when I use ZK 6 and SelectComposer ( I upgraded ZK version )

this is my listbox bind

<listbox sclass="employee-list" vflex="true" hflex="1"
			model="@load(vm.contributorList)"
			selectedItem="@bind(vm.selectedContributor)"   >
			<listhead>
				<listheader label="Role" width="50px" align="left" ></listheader>
				<listheader label="User Name" align="left" sort="auto(ASC)" ></listheader>
				<listheader label="Description" align="left" ></listheader>
				<listheader label="Email" align="left" ></listheader>
			</listhead>
			<template name="model" var="contributor">
				<listitem>
					<listcell label="@load(contributor.iRole)" ></listcell>
					<listcell label="@load(contributor.sUserName)" ></listcell>
					<listcell label="@load(contributor.sEmail)" ></listcell>
					<listcell label="@load(contributor.sDescription)" ></listcell>
				</listitem>
			</template>

		</listbox>

HTTP Status 500 - Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/BaseWeb/pages/user/test.zul line 75 col 45]


org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: template in [LanguageDefinition: xul/html], [SYS file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/BaseWeb/pages/user/test.zul line 75 col 45]

Line 75 is: <template name="model" var="contributor">

link publish delete flag offensive edit
0

answered 2013-01-15 09:54:17 +0800

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

what do you mean with 'include' ?

You can upgrade the zk version to the latest 6.5.1.1. There are only a few things to modified in your code.

link publish delete flag offensive edit
0

answered 2013-01-15 09:45:46 +0800

zerocold gravatar image zerocold
128 1

oh, at this moment i use ZK 5 ( it include build path ) so if I want to use ZK 6 then I must include it again ? right ?

link publish delete flag offensive edit
0

answered 2013-01-15 09:25:18 +0800

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

Sure, no problem

for such things like: java.lang.NoClassDefFoundError: org/zkoss/zk/ui/select/SelectorComposer

search the zk api for SelectorComposer.

you will find the api documentation here: http://www.zkoss.org/javadoc/6.5.1/zk/org/zkoss/zk/ui/select/SelectorComposer.html

Since:
6.0.0

So the SelectorComposer class is not in 5.x version.

best
Stephan

link publish delete flag offensive edit
Your answer
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: 2013-01-10 09:43:48 +0800

Seen: 261 times

Last updated: Jan 15 '13

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