hibernate - How to use DisplayTag with nested Lists and Properties in Struts 2 -
hibernate - How to use DisplayTag with nested Lists and Properties in Struts 2 -
i'm trying display list. within list there list want display. struts code looked this:
<s:iterator value="lendinglist"> <tr> <td><s:property value="lendby.matnumber" /> <s:property value="lendby.firstname" /> <s:property value="lendby.name" /></td> <td><s:property value="date" /></td> <td><s:iterator value="publication"> <s:property value="isbn" /> </s:iterator></td> <td><s:iterator value="publication"> <s:property value="title" /> </s:iterator></td> <td><s:property value="returndate" /></td> <td><s:property value="remindprocessstarted" /></td>
the new displaytag table looks this:
<display:table id="lendinglist" name="lendinglist" pagesize="6" cellpadding="5px;" cellspacing="5px;" style="margin-left:50px;margin-top:20px;" requesturi="" sort="list"> <display:column property="lendby.matnumber" title="mat.-nr." sortable="true" /> <display:column property="lendby.firstname" title="nachname" sortable="true" /> <display:column property="lendby.name" title="vorname" sortable="true" /> <display:column property="publication.isbn" title="vorname" sortable="true" /> <display:column property="publication.title" title="vorname" sortable="true" /> <display:column property="returndate" title="rückgabedatum" sortable="true" /> </display:table>
i tried access properties publication.isbn
, unfortunately not working. couldn't find hints in documentation.
the problem had give uid
table, after can access properties struts iterator
this:
<display:column media="html" title="titel" sortable="true"> <s:iterator value="#attr.lendinglist.publication"> <s:property value="title" /> </s:iterator> </display:column>
hibernate struts2 struts displaytag
Comments
Post a Comment