Hi,
I was wondering if the following can be done:
I got 2 entities in a bean and a vector of beans and i need to display some fields frm both entities.
eg.
beanSummary1.add(entity1)
beanSummary1.add(entity2)
beanSummary2.add(entity1)
beanSummary2.add(entity2)
beanSummary3.add(entity1)
beanSummary3.add(entity2)
beanSummaryVec.add(beanSummary1)
beanSummaryVec.add(beanSummary2)
beanSummaryVec.add(beanSummary3)
So in my
jsp page i iterate over each beanSummary but i need to display a couple of fields from each entites.
I started doing the following:
<logic:iterate id="beanSummary" name="beanSummaryVec">
<tr>
<td><bean:write name="beanSummary" property="entity1.Field1"/> </td>
<td><bean:write name="beanSummary" property="entity1.Field2"/> </td>
<td><bean:write name="beanSummary" property="entity2.Field1"/> </td>
<td><bean:write name="beanSummary" property="entity2.Field2"/> </td>
</tr>
</logic:iterate>
and it wrong. But can it be done without making the beanSummary into a flat entity.
I was trying to use nested but could not get it working.
Thanks
Anil