On Wed, 1 Aug 2001, Kapila, Ranjit wrote:
> Hi,
>
> In the ActionServlet.process() method, the processPopulate() method is
> always called. Is there any way to set some request attribute etc so
> that the processPopulate call is configurable.
>
If you don't want processPopulate() to be called, just omit the form bean
from your <action> element.
> The underlying problem is that if I prefill my form, all the values are
> overwritten by the Request objects current parameter values.
>
> I this something that other people have run into? Any work around?
>
If your case is what I'm thinking it is, you probably want to consider
using different actions for prepopulating (and then displaying) a form,
versus accepting (and processing) the form submit.
Consider in the struts-example application what happens when you select
the "Edit your registration profile" option from the main menu:
* This link goes to the "/editRegistration" action, which
* Prepopulates the form bean, and
* Forwards to the "/registration.jsp" page to display it with
values from the "database".
* Then, the form is submitted to the "/saveRegistration" action,
which validates the input (returning on any errors) or does
the appropriate database action.
> Thanks,
>
> Ranjit
>
>
Craig