Hello to all...
I'am working on a large project for car assicuration.
My question is if it's possible to prepopulate a form for example..
On page A user must enter policy number... then in actionForm bean i get
datas from DB and depends on datas I must prepopulate a form B
Anyone have some short example how to prepopulate a ActionForm..?
I tryed to get actionForm bean from session but I'dont know if this is ok...
for example this code is from my ActionForm which is on page A:
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
System.out.println("================");
System.out.println("Action1");
session = request.getSession();
AO2formbean fmb = (AO3formbean)
session.getAttribute("AO2formbean"); <--- this is a bean (ActionForm
which is on page B)
fmb.setName("ccccc"); <-- here I set some data (prepopulate
actionform bean from page B)
session.setAttrribute("AO2formbean",fmb); <-- here I'store a
bean in session...
return mapping.findForward("ok");
}
Is this correct or no?
I need 2 things
first i must strore a bean in session because I must display some data
from bean many times on different forms (pages)..
second i must prepopulate fields displayed in next page (A -> B)
thnx for any help
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]