-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I try to show only some of the items in a set in my zul-page.
I want to achieve this goal in EL.
I have something like:
<listbox model="@load(vm.usertypes)" multiple="true" checkmark="true" sclass="checklist" selectedItems="@bind(vm.selectedUsertypes)"> <template name="model" var="pt"> <listitem if="@load(pt.category eq 'Personnel')"> <listcell label="@load(pt.name)" /> </listitem> </template> </listbox>
I recieve this error: The model template must have exactly one item, not 0.
Is it possible to show some of the items (based on the usertype-category) via EL expressions?
Thanks,
jaan
What you need to do is load it from the database based on the usertype-category, not load all of them and then filter it based on the usertype-category.
Or, if you cannot do it for some reason, just filter it before you set it as the model.
Asked: 2012-08-11 12:45:10 +0800
Seen: 137 times
Last updated: Aug 11 '12