0

ZK Macro Component have issue when i am using @bind

asked 2012-08-09 08:56:46 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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>


This COde is working fine But when i trying to put Java Code in Java FIle and clling by @Load in forEach it is not working anyone have any Idea what Can be Isue?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2012-08-13 05:53:11 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Is this ZK Issue? Or i am doing something wrong

link publish delete flag offensive edit

answered 2012-08-18 17:28:32 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

updated 2012-08-18 17:28:46 +0800

I think i was wrong i have to use like this forEach="${vm.columns}"

Vm=My View Model Id
columns = List of data

link publish delete flag offensive edit

answered 2012-08-21 01:30:10 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

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

link publish delete flag offensive edit

answered 2012-08-21 05:20:52 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Thanks Dennis for your reply it will good if you will add small talk for above issue.
Thanks

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

Follow

RSS

Stats

Asked: 2012-08-09 08:56:46 +0800

Seen: 225 times

Last updated: Aug 21 '12

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