-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
ZK n00b here. I've been thrown in the deep end and tasked with making some changes to an application written with version 6.5.2.
I've created a Panel as a .zul file which displays on the screen. Display of data and functionality is controlled by a Java class which extends SelectorComposer<panel>.
The controller is defined as a Spring bean and referenced in the .zul file like this:
<panel id="myPanel" apply="${nameOfBean}">
Is there any way I can access fields of the bean in the .zul file? I've created a Listhead object in the controller (I have a large number of headings which I don't want to manually type into the .zul file) but can't find an appropriate method to assign it to the Listbox in the controller. What I'd like to do is something like this:
myListbox.setListhead(myListhead);
Thanks,
Hello Plank,
In order to avoid manually typing into the zul file the headings you have to implement it in your controller.
In the controller, in your initiallization method, you will create a list of headers (you can retrieve the list from a string, database, jason, etc).
Then iterate the list, and for each item create an listHeader instance and set it's label.
Also add each listHeader to the listHead object;
Finally add the listHead to the listbox as you have pointed out above.
Best Regards,
Darksu
Asked: 2014-03-13 01:58:16 +0800
Seen: 15 times
Last updated: Aug 09 '14