Listhead template

asked 2012-06-11 07:55:23 +0800

ajvan gravatar image ajvan

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!!

p.s. I am using ZK 6.0.0.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-07-24 01:35:03 +0800

paowang gravatar image paowang
140 6

Can you provide some code about <listbox> in your .zul?
What is actual type of Item in ListModelList?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2012-06-11 07:55:23 +0800

Seen: 87 times

Last updated: Jul 24 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More