-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello everyone,
Does anybody know how can I dynamically create listheaders in a listbox depending on the ListModelList from ViewModel (since I cannot put model on listhead component)?
To make thing more clear I will explain in more detail the problem:
I have a listbox representing the list of some items according to ListModelList<Item>. Each of these items have some fixed properties for which I have a fixed listheader inside of listhead (e.g. Name, Description, Publish date etc.). I can represent this easily by putting the model on the listbox and wrap listitem with template.
Each of these items could have other properties which are declared in the application itself (let's call them user defined properties). So in the ViewModel I have a datastructure ListModelList<UserDefinedProperty> and for each of these I would like to have a column in the listbox and cell in the listitem.
Obviously, this is dynamic, so I cannot put a predefined listhead since I don't know the number of user defined properties a priori. Easy way to achieve this would be putting a template on listhead, but this is not supported. I guess that I could do this programatically in Java but that would require a lot of work in changing the whole application, which I would like to avoid.
What can I do? Is there a way to do this in .zul?
Thanks in advance!!
Ajvan
p.s. I am using ZK 6.0.0.
Asked: 2012-06-11 07:55:23 +0800
Seen: 87 times
Last updated: Jul 24 '12