-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi *,
I have a case, where my "form" is dynamic generated from a list of pojos.
Something like this.
<grid model="@bind(vm.products)" form="id('fx') @load(vm.products) @save(vm.products, after='save')"> <template name="model"> <row> <label value="@bind(fx.acronym)"/> <intbox value="@bind(fx.price)"/> </row> </template> </grid> <button label="save" onClick="@command('save')"/>
Is it possible? I mean, I don't think that ZK supports this kind of complexity, but is it possible if I implement/override some interfaces/classes?
If so could someone give me some hints on which classes/interfaces should I implement?
Thanks,
Madruga
hi
from the doc, form object is create by ZK, and it's role is a Middle Object.
doc mentioned it only stores those properties which attributes are bound to
from the description, seems there's no need for developer to create their own form object, at least, I can't think of any reason.
Could you share your point, why you need create form object by yourself ?
Hi Sam,
My case is that my middle object is a List<Object> products, and I want my Form to set/get values on my products list, something like this:
middleObjectSimulatingProducts.getAt(index).set/getValue().
Basically, the current forms gives me a middle object that mirrors a single bean, I want a form object which will mirror a list of beans for me.
Hope I made myself clear.
Thanks for the help,
Regards - Madruga
Asked: 2012-03-29 23:57:14 +0800
Seen: 237 times
Last updated: Apr 18 '12