-
FEATURED COMPONENTS
First time here? Check out the FAQ!
When I try to use the mvc and display something by LISTBOX,
I have to declare the model like
<listbox model="${sth.here}" ...............><="" p="">
sth should be the controller, and then what should I place for "here"?
In the documentation, I dont understand what it is about.
You can check in LoadOnDemandController.java class there is a method ..
public GroupsModel<Mail, Object, Object> getMailData() {
return groupsModel;
}
This will return the model data which required to show in the ZUl page and Data will be provided by MailModel.java class .
You know that in ZK every ZUL page varaible bind with java code get/set method so here in your ZUL page you have model="${$composer.mailData}"
and in your java class you have getMailData()
so its not matter here if you created a variable List mailData;
or not in your java class and Java class take getMailData()
as a simple method so it is working fine without any issue.
For your grounpbox question see this Zk Groupbox fact
Asked: 2013-04-22 09:17:59 +0800
Seen: 28 times
Last updated: Apr 23 '13
What you want to achieve here can you please explain briefly ?
sjoshi ( 2013-04-22 10:10:09 +0800 )editfor example, the link from ZK demo http://www.zkoss.org/zkdemo/grid/load_on_demand (http://www.zkoss.org/zkdemo/grid/loadondemand)
in the "View" part, <div apply="demo.grid.loadondemand.LoadOnDemandController"> - To find the on_dem.... class <grid height="400px" model="${$composer.mailData}"> - how about this? where is the mailData?
kimtch ( 2013-04-23 02:38:37 +0800 )editHi sjoshi, i would like to know why composer.mailData, this "mailData" never appear in model or controller.
kimtch ( 2013-04-23 07:50:53 +0800 )editSee my edited answer
sjoshi ( 2013-04-23 08:07:14 +0800 )editThanks, sjoshi. can I assume that ZK will do some auto databinding? and second another question in this example,
<template name ="model:group">
model should point to the grid model, then how about :group?
kimtch ( 2013-04-23 08:14:31 +0800 )edit