-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi I am trying to create a Macro Component and passing List to forEach atributes It is working Without Bind but have Issue When I am trying to run With Bind
.
<b >PROCESSLIST.ZUL</b> <?component name="processDetail" macroURI="process_list_macro.zul"?> <window width="100%" height="100%" > <zscript><![CDATA[ class FolderProcessData { String folderName; String folderDesc; public String getFolderName() { return folderName; } public void setFolderName(String folderName) { this.folderName = folderName; } public String getFolderDesc() { return folderDesc; } public void setFolderDesc(String folderDesc) { this.folderDesc = folderDesc; } } FolderProcessData folderproData = new FolderProcessData(); folderproData.setFolderDesc("Hari"); folderproData.setFolderName("Om"); List quarters = new ArrayList(); quarters.add(folderproData); ]]> </zscript> <processDetail id="folderProcessData" data="${each}" forEach="${quarters}" /> </window> <b >PROCESS_LIST_MACRO.ZUL</b> <groupbox> <caption> <label id="titleLabel" sclass="title" value="${arg.data.folderName}" > </label> </caption> </groupbox>
Is this ZK Issue? Or i am doing something wrong
I think i was wrong i have to use like this forEach="${vm.columns}"
Vm=My View Model Id
columns = List of data
We are planing to write a smalltalk/reference to introduce this.
Basically, you have to write some zk-bind configuration in your component to help binder handle the save and load event.
there is few info at http://books.zkoss.org/wiki/ZK%20Component%20Reference/Annotation/Data%20Binding
Thanks Dennis for your reply it will good if you will add small talk for above issue.
Thanks
Asked: 2012-08-09 08:56:46 +0800
Seen: 225 times
Last updated: Aug 21 '12