I do the following:
1. Let us say, you want to submit from 'fromPage' and want to do some
pre-processing before you give out 'toPage'.
2. In all my Action objects, I have two methods - 'preprocess()' and
'postprocess()'.
3. I submit ALL the requests from 'fromPage' to the Action object
corresponding to fromPage. Here, I do the postprocessing. In this, I update
the beans (application state) using submitted form object.
4. Then I forward request to the Action object corresponding to the
'toPage'.
5. Here I do the preprocessing, in which I update the formBean corresponding
to toPage using the business beans (application state) - this is like
pre-population that you are referring to.
6. Now, I pass the control to the toPage.jsp. This uses the formObject
pre-populated in earlier step.
Hope this helps.
Sujit
-----Original Message-----
From: Kiet Nguyen [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 10:06 AM
To: Struts-User (E-mail)
Subject: Pre populate
I need to pre-populate my form and do some business processes prior to load
a page. Where would be the best place for this. I don't want to put it in
the peform method of the "from page". And doing business process at the
form bean does not seen appropriate.
thanks