[ 
https://issues.apache.org/struts/browse/STR-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40073
 ] 

Michael Jouravlev commented on STR-286:
---------------------------------------

Fixed in the trunk, targeting Struts 1.4. Changes made:

1) struts-config.xml now allows two new attributes for "action" element: 
"reset" and "populate". Both attributes are optional, if omitted the behavior 
does not differ from prior Struts versions. If either of these properties is 
specified, it should have one of the following values: "request", "forward", 
"request-forward" (default) or "none". Struts will reset and/or populate a 
corresponding form bean (b) if HTTP request is not forwared and value is 
"request" or "request-forward"; (b) if HTTP request is forwarded and value is 
"forward" or "request-forward".

2) To accomodate change in struts-config.xml, struts-config_1_3.dtd was updated 
as well as ActionConfig.java.

3) chain-config.xml was updated: PopulateActionForm.java handles new population 
strategy, ActionPostProcess.java sets forward flag in the request object. 

4) Flag key is defined in Globals.java.

5) isForwarded() method was added to RequestUtils.java.



> Multiple calls to populate ActionForm
> -------------------------------------
>
>                 Key: STR-286
>                 URL: https://issues.apache.org/struts/browse/STR-286
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0 Final
>         Environment: Operating System: All
> Platform: Other
>            Reporter: aria.kiahaschemi
>         Assigned To: Michael Jouravlev
>             Fix For: Future
>
>
> Within a sequence of Actions (with no intermediate user interaction), the 
> ActionForm is populated with the request parameters' values each time the 
> request is forwarded to the next Action. As a consequence, an Action B, 
> following an Action A, will not 'see' the ActionForm in the state Action A 
> left 
> it in, but instead get as the ActionForm's properties' values, the 
> parameters' 
> values provided with the HTTP request. (I.e. Action B 'sees' in the 
> ActionForm 
> what, e.g., the user entered, instead of what Action A already did with it.)
> Suggestion to discuss:
> It might be cofigurable within the struts-config.xml to set an Action to 
> either 'ActionForm_population_required' (default), 
> or 'ActionForm_do_not_populate'.
> Thank you in advance for any response!
> Aria

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to