struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahearn, Denis" <DEN...@firepond.com>
Subject RequestProcessor.processPopulate happens more than once when one Struts action forwards to another
Date Mon, 02 Jun 2003 13:42:52 GMT
Hi,

When one Struts action forwards to another Struts action, and the first
action was invoked by a form post, is it correct behavior that the
RequestProcessor.processPopulate method is called when the second action is
processed?  It seems to me that the form should only be populated from the
request parameters during the initial action, and not by each subsequent
action.

The current behavior causes me problems because I manually set some values
into the form in the first Struts action, and then forward to the second
action to save the form to a database.  The problem is, when the second
action is processed, the initial form values are set back into the form,
overwriting the changes made in the first action.

I was able to work around this problem by extending
RequestProcessor.processPopulate and checking for a custom property on the
action mapping which determines if the form should be populated or not.
This works, however it seems to me that the real problem is that Struts
populates the form for each Struts action that is being forwarded to.

Thanks,
Denis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message