Suppose for instance you want to prepopulate a form where users
can edit their profile;

the way i do it is:
I have an action PrepareEditProfileAction that
a) gets the data from storage
b) creates a editProfileFormBean and puts the data in it
c) saves this editProfileFormBean in request-scope
d) forwards to the edit profile jsp page, which then
   displays the data from the editProfileFormBean in request scope..

so your struts-config.xml looks like:

<!-- prepopulate -->
<action path="/actions/prepareeditprofile"
  type="actions.PrepareEditProfileAction">
<forward name="success" path="/editprofileform.jsp" />
</action>

<action path="/actions/editprofile"
  type="actions.EditProfileAction"
  name="editProfileFormBean"
  scope="request"
  validate="true"
  input="/actions/prepareeditprofile.do">
<forward name="success" path="/success.jsp" />
</action>


Is this a common reproach?
I've seen people using the "input" attribute point to an prepopulate
action? 

Thanks for your time,
Koen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to