Problem with new databind in zk 6 using listbox
23 Jan 2012 14:00:20 GMT
24 Jan 2012 17:42:23 GMT
24 Jan 2012 17:42:23 GMT
Hi,
I found solution to this problem.
Thanks,
Miguel Goncalves
25 Jan 2012 07:04:40 GMT
25 Jan 2012 07:04:40 GMT
Please share your solution with us.
25 Jan 2012 11:23:46 GMT
25 Jan 2012 11:23:46 GMT
Hi,
Zk try to find a method like getConverter or method with varArgs in class associated with vm.
My solution was create method getConverter:
public Converter getConverter(final String name)
throws InstantiationException, IllegalAccessException,
ClassNotFoundException {
System.out.println("BaseService.getConverter() " + name);
return (Converter) Class.forName(name).newInstance();
}
ZK - Open Source Ajax Java Framework
<listbox model="@load(vm.items)" selectedItem="@bind(vm.selectedItem)"> <listhead> <listheader label="idCaracteristicas"/><listheader label="descricao"/></listhead> <template name="model" var="item"><listitem value="@load(item)"><listcell><a label="@load(item.idCaracteristicas) @converter('vipconnect.framework.zk.databind.IntegerConverter')" onClick="@command('clickA',item=self.getParent().getParent())"/></listcell><listcell label="@load(item.descricao) "/></listitem></template></listbox>