I'm trying to display a list. Inside this list there is another list which I want to display. With Struts my code looked like 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 like 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 to access the properties with publication.isbn
, but unfortunately it is not working. I couldn't find any hints in the documentation.
The problem was that I had to give a
uid
to the table, after that I can access the properties with a Strutsiterator
like this: