Hi Ranchers,
I have link called Details,when i click on the link,appropriate function is called and a new page is shown with the form elements populated,
but for me the elements values are not getting populated..
<html:link page="/PatientDetails.do?action=getPatientDetails">Details</html:link>
------------------------
struts-config.xml
--------------------------
<action-mappings>
<action
path="/PatientDetails"
type="ssl.phr.patientdemographics.actionservlet.PatientAction"
name="PatientDetailsForm"
scope="request"
validate="true"
parameter="action"
input="/patientregistration.jsp">
<forward name="success" path="/patientregistrationcard.jsp"/>
<forward name="patientdetails" path="/patientdetails.jsp"/>
</action>
-----------------------
part of action class
-------------------------
public ActionForward getPatientDetails(ActionMapping mapping,
ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException {
HttpSession session = request.getSession();
PatientDetailsDAO dao= new PatientDetailsDAO();
//int patientID;
String userName=(String)session.getAttribute("userName");
int pid=((Integer)session.getAttribute("patientID")).intValue();
response.setContentType("text/html");
PrintWriter out = response.getWriter();
PatientDetailsForm pdform =(PatientDetailsForm) form;
pdform=(PatientDetailsForm)dao.retrieveRecord(pid);
return mapping.findForward(Patientdetials);
} // end PatientDetails
-------------------
here is my
jsp page
-----------------------
<html:form method="post" action="/patientRegistration">
<html:text property="firstName" size="30" styleClass="formtext-1"/>
<html:text property="middleInitial" size="30" styleClass="formtext-1" />
<html:text property="lastName" size="30" styleClass="formtext-1" />
</html:form>
----------------
how to use value attribute here
help me out..
Thanks
[ March 22, 2007: Message edited by: sreenivas jeenor ]