-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I followed this link and used as follows
<listbox sclass="mylist"
selectedItem="@bind(vm.selectedLineItem)"
model="@bind(vm.transDetails) @template(vm.type='foo'?'template1':'template2')"
emptyMessage="No record found for the given search condition.">
But showing error as follows
Run time error as follows
org.zkoss.util.IllegalSyntaxException: Must specify a template for model of <listbox izpdwe=""> at [file:/F:/MyDocuments/Java/ZK7LabSystem/LabSystem/LabSystem/src/main/webapp/zk/billing/searchlineitem.zul, line:352] at org.zkoss.bind.impl.AnnotateBinderHelper.parseTemplate(AnnotateBinderHelper.java:781) at org.zkoss.bind.impl.AnnotateBinderHelper.processPropertyBindings(AnnotateBinderHelper.java:230) at org.zkoss.bind.impl.AnnotateBinderHelper.processComponentBindings0(AnnotateBinderHelper.java:113)
actually this is solved, there are some problems in ZL (Bug), I just resolved as follows
model="@bind(vm.transDetails) @template(vm.listlayout)"
and changed the template option on button click. On button click the variable is changed to template1 and template2
Hello Sentil, I suggest you write vm.type eq 'foo'
. '=' is an assignment and can not be evaluated as the ternary operator.
Kai
Asked: 2014-05-26 08:31:37 +0800
Seen: 24 times
Last updated: May 26 '14
Senti, maybe stupid to ask but can you write your whole listbox, inclusif the templates?
chillworld ( 2014-05-26 08:55:18 +0800 )edit