I have an application in ZK providers in my database, and i have my DAO to return all the names of my database.
And i have this view in ZK:
<zk>
<window id="Mnos" border="normal" mode="modal" width="320px"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('operator')">
<listbox model="@load(vm.provider)" onClick="@command('provider', provider = each)"/>
</window>
</zk>
I need that when a user do click in some provider, save a session variable to use in my application, because i have a crud of services and when i create a service i need create the service related with the provider that the user choose in the menu, and i need create workers and i need create a worker related with the provider that the user choose in the menu,
and i have this java class:
public class operator {
Collection<String> provider = MnoDAO.getAllProvidersByName();
public Collection<String> getMno() {
return mno;
}
@Command
public void provider(@BindingParam("provider") String provider){
Messagebox.show("Hola ... "+mnoList);
}
}
My main problem is that each
is always null, and second i do not know how can i save a sesion variable to use in all application, and this variable can be change when i select other provider.
Somebody can help me?