-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4519768
By: onlytre
im new to zk so please excuse me for the (maybe) simple question.
i need to access to collections element in another collection of element
snippets of my classes:
class person{
Set emails;
}
class email{
String address;
}
this modified example (databind 4) doesnt work for me, i cant access the email collection inside a person object
please help me and if possible provide some code.
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> <window xmlns:a="http://www.zkoss.org/2005/zk/annotation">
<a:bind model="persons" selectedItem="selected"/>
<listbox rows="4">
<a:bind _var="person"/>
<listitem>
<a:bind label="person.firstName"/>
<listcell/>
<a:bind label="person.lastName"/>
<listcell/>
<listcell>
<a:bind model="person.emails">
<listbox rows="1"/>
<a:bind _var="email"/>
<listitem>
<a:bind label="email.address"/>
<listcell/>
<listitem>
</listbox>
</listcell>
</listitem>
</listbox>
<!-- show the detail of the selected person -->
<grid>
<rows>
<row>First Name: <a:bind value="selected.firstName"/><textbox/></row>
<row>Last Name: <a:bind value="selected.lastName"/><textbox/></row>
<row>Email: <a:bind value="selected.email"/><label/></row>
</rows>
</grid>
</window>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4520015
By: robbiecheng
Did you specify a getEmails() method in you Person Class?
/Robbie
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4521005
By: onlytre
obviously yes, maybe the problem is with Hibernate and lazy loading of emails collection?
Asked: 2007-09-15 09:17:06 +0800
Seen: 310 times
Last updated: Nov 13 '09