hubaghdadi
Feb 23rd, 2006, 08:50 PM
Hi.
I don't know really where to post my question, it can be posted at ORM, Application Frameworks
or Struts forums.
I' trying to reimplement PetClinic web app of Spring's dist using Spring, Hibernate and Struts.
Now, I'm in owners.jsp , which displays a list owners whom meet the last name searching.
In front of each owner there is a submit button to display a new page (ownerdetails.jsp) which
shows owner's informations (city, telephone and a list of his pets).
In order to display a list of owner's pets, I wrote :
<td><c:if test="${requestScope.owner[pets].size gt 0}">
<table>
<c:forEach items="${requestScope.owner[pets]}" var="pet">
<tr>
<td><c:out value="${pet.name}" /></td>
</tr>
<tr>
<td><c:out value="${pet.birthDate}" /></td>
</tr>
<tr>
<td><c:out value="${pet.type}" /></td>
</tr>
</c:forEach>
</table>
</c:if>
</td>
And in OwnerDetailsAction.java :
String ownerId = request.getParameter("ownerId");
clinic = this.getClinic();
Owner owner = clinic.loadOwner(Integer.parseInt(ownerId));
request.setAttribute("owner", owner);
return mapping.findForward("owner-details");
Please note, that no exception thrown at all, all owner's information displayed correctly except
his pets list, nothing in the output.
Any ideas ?
I don't know really where to post my question, it can be posted at ORM, Application Frameworks
or Struts forums.
I' trying to reimplement PetClinic web app of Spring's dist using Spring, Hibernate and Struts.
Now, I'm in owners.jsp , which displays a list owners whom meet the last name searching.
In front of each owner there is a submit button to display a new page (ownerdetails.jsp) which
shows owner's informations (city, telephone and a list of his pets).
In order to display a list of owner's pets, I wrote :
<td><c:if test="${requestScope.owner[pets].size gt 0}">
<table>
<c:forEach items="${requestScope.owner[pets]}" var="pet">
<tr>
<td><c:out value="${pet.name}" /></td>
</tr>
<tr>
<td><c:out value="${pet.birthDate}" /></td>
</tr>
<tr>
<td><c:out value="${pet.type}" /></td>
</tr>
</c:forEach>
</table>
</c:if>
</td>
And in OwnerDetailsAction.java :
String ownerId = request.getParameter("ownerId");
clinic = this.getClinic();
Owner owner = clinic.loadOwner(Integer.parseInt(ownerId));
request.setAttribute("owner", owner);
return mapping.findForward("owner-details");
Please note, that no exception thrown at all, all owner's information displayed correctly except
his pets list, nothing in the output.
Any ideas ?