Revision history [back]

click to hide/show revision 1
initial version

asked 2011-05-29 10:38:42 +0800

ftmichael gravatar image ftmichael

foreach

hi there, i'm in trouble. i've just read documentations and forum-posts, but i've not found any solution for my problem.

i have a composer: MyComposer.java public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); //new UserDB(); UserDB.createPOIs(); //wire variables Components.wireVariables(comp, this); //register onXxx event listeners Events.addEventListeners(comp, this); //auto forward Components.addForwards(comp, this); list.add("Eins"); list.add("Zwei"); comp.setAttribute("test", this, false); } public List<string> getList(){ return list; } and a zul page: index.zul where i apply my MyComposer.java in this zul file i want to loop throught the returned list: <zk foreach="${test.testList}" &gt;="" <textbox="" value="${each}"/> </zk>

the problem is, that this won't work. i found out that in "foreach" there is only EL allowed. i have to access the variable defined in MyComposer.

I hope someone can help me. Best Regards

[Edit:] I'm using the latest version of zk

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