-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
Try Stephen Solution
Be sure you have all needed jars in the project. I don't know how you build the project. With maven?
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
Make a Tomcat 'clean' and Tomcat 'clean working directory' and redeploy it again.
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">
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.
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
Asked: 2013-01-10 09:43:48 +0800
Seen: 261 times
Last updated: Jan 15 '13