-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello:
I want to load a zul page, manage it dynamically (remove, change attributes, reorder components...) and save updates on file. I can use Executions.createComponents* for load... but for render/saving?
Any ideas? Thanks.
Hi szarza,
You can store the status into DB, and restore the status from DB.
Thank you, but my question is not about where to save the state, but to get zul code from zul objects. For example, if I have a label l, a Button b and a Textbox t in a Window and is modified by l.setValue l ("new label"). How do you get, from these instances, the code "<label value="new label><button ...><textbox ...>"?
Regards,
I think you're asking for a zul serializer; I'm currently needing something very similar. To the best of my knowledge zk does not include such an utility, and unfortunately there is no way to fully serialize any given component. Just think about it: what abound bound beans? bound variables? list models?
I've managed to write a simple serializer that manages "simple" components (input boxes, checkboxes, structural components, containers...) and that could be easily expanded to take into account non-model listboxes, trees and the like. However I don't think it's very practical, but for very specific purposes.
With kind regards
César Varona
You're absolutely right, César. Indeed, that's just what I'm looking for. I'm working in an application where user can create and modify components on the fly and then serialize to a .zul file.
Regards,
Samuel
Asked: 2012-01-10 11:17:12 +0800
Seen: 174 times
Last updated: Feb 08 '12