-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I had posted a question before(forum.zkoss.org/question/95200/iterate-through-a-list-of-lists-in-zk-framework/) and implemented code based on the suggestion I got. I'm posting this question because the suggestion given in this question (forum.zkoss.org/question/65734/foreach/) didn't work for me. Here is my zul
code-
<vlayout id="vlayoutId" spacing="0px" style="background-color: #F6F6F6">
<zk forEach="${categoriesList}">
<groupbox id="gbxId" mold="3d" style="top:470px;" visible="false">
<caption label="${c:l('captionLabel')}" sclass="toggle_open">
<div id="arrowUser" />
</caption>
<listbox id="lbxUser"></listbox>
<div id="divNumOfUsers" style="cursor: pointer; padding: 4px; background-color: rgb(224, 224, 224);" visible="false">
<label id="${each}" zclass="studyuser_item_label_other" forward="onClick = onClickLblMoreUsers" value="${each.value}" />
</div>
</groupbox>
</zk>
</vlayout>
and here is my java code-
public void onClickLblMoreUsers(final Event event) {
System.out.println("testing12345");
}
Also, when I did an 'Inspect element' on the label, I observed that the attribute forward="onClick = onClickLblMoreUsers"
didn't appear. So, I hard-coded this way in java layer-
lblMoreUsers.setAttribute("forward", "onClick = onClickLblMoreUsers");
Asked: 2014-12-10 11:02:25 +0800
Seen: 19 times
Last updated: Dec 10 '14