Hi ranchers,
I want to dislay
jsp in the following manner..
date1 date2 date3 . . .
--------------------------------------
data1 data2 data3 . . .
data12 data22 data32 . . .
data13 data23 data33 . . .
. . . . . .
--------------------------------------------------------
here is my action class code
public ActionForward getPatientVitals(ActionMapping mapping,
ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException {
HttpSession session = request.getSession();
PatientVitalsDAO dao= new PatientVitalsDAO();
//int patientID;
String userName=(String)session.getAttribute("userName");
String pid=((Integer)session.getAttribute("patientID")).toString();
response.setContentType("text/html");
PrintWriter out = response.getWriter();
System.out.println("inside complaints retrieve method");
PatientVitalsForm pvform =(PatientVitalsForm) form;
List desc=dao.getVDate(pid); // retrieve list of Dates
session.setAttribute("PVitalDates",desc);
ArrayList data=new ArrayList();
data=(ArrayList)dao.retrieveVitalsRecord(pid);
//retrieve List of DTO objects for dates
session.setAttribute("PVitals",data); return mapping.findForward(SUCCESS);
} // end getPatientVitals
------------------------------
here is my jsp page
<table width="20%" border="0" cellspacing="0" cellpadding="0">
<tr>
<logic
resent name="PVitalDates" scope="session">
<bean:size id="dcount" name="PVitalDates"/>
<logic:greaterThan name="dcount" value="0">
<logic:iterate name="PVitalDates" id="vdates" type="ssl.phr.patientdemographics.dto.PatientVitalsForm">
<td width="2%" valign="top"><table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td height="55" align="center" class="bodytext-black"><bean:write name="vdates" property="vitalDate"/><br>
<html:link action="/VitalsAction?methodType=getVital" paramId="vitalId" paramName="vdates" paramProperty="vitalId">Edit</html:link>
</td></tr>
<bean
efine id="vitals" name="PVitals" scope="session" type="ssl.phr.patientdemographics.dto.PatientVitalsForm">
<tr><td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="bpSystolic"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="bpDiastolic"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="weight"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black">bean:write name="vitals" property="height"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="temperature"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="pulse"/></div></td></tr>
<tr> <td height="26" >
<div align="center" class="bodytext-black"><bean:write name="vitals" property="respiration"/></div></td> </tr>
</table>
</bean
efine>
</logic:iterate>
</logic:greaterThan>
</logic
resent>
--------------------------------
here i can only able to iterate dates but not able to iterate data related to dates..
help me out.
Thanks
Sreenivas
[ March 30, 2007: Message edited by: sreenivas jeenor ]