-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm new to zk so please be kind :-)
I have the following in a zul file:
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?> <div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('com.company.viewModels.UsersListViewModel')"> <listbox id="usersListbox" model="@load(vm.users)" selectedItem="@bind(vm.selectedItem)"> <listhead sizable="true"> <listheader label="Firstname" /> <listheader label="Lastname" /> </listhead> <template name="model" var="umdbUser"> <listitem> <listcell label="@load(umdbUser.firstName)" /> <listcell label="@load(umdbUser.lastName)" /> </listitem> </template> </listbox> </div>
The problem is that I am using spring in my UsersListViewModel to inject service that perform the calls to load the list of users. Obviously the code above does not work since the VM bean is not spring loaded. In an other zul file I just use the following notation ${usersListViewModel} and it works, but not here.
Does someone have any help for me? Thanks
BB
Peter
Asked: 2012-03-15 16:00:15 +0800
Seen: 206 times
Last updated: Mar 19 '12