You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/04/24 17:58:10 UTC

[jira] Resolved: (STR-2612) reset() support for DynaActionForm

     [ http://issues.apache.org/struts/browse/STR-2612?page=all ]
     
David Evans resolved STR-2612:
------------------------------

    Resolution: Fixed

> reset() support for DynaActionForm
> ----------------------------------
>
>          Key: STR-2612
>          URL: http://issues.apache.org/struts/browse/STR-2612
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Action
>     Versions: Unknown
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Hubert Rabago
>     Assignee: David Evans
>     Priority: Minor
>      Fix For: 1.3.0
>  Attachments: dafr.txt
>
> Handling reset() for certain fields in dyna forms would help with the 
> requirements of the <html:checkbox> tag.
> There are two approaches I've thought of so far.
> 1) Simply reset any boolean fields to false inside reset().  This could cause 
> backward-compatibility issues if anyone out there is using boolean fields in 
> action forms for anything other than checkboxes.
> 2) Allow the user to configure both an initial value and a reset flag.  This 
> could be something like:
> <form-bean 
>     name="MyForm" 
>     type="org.apache.struts.action.DynaActionForm">
>     <form-property 
>         name="firstName" 
>         type="java.lang.String" />
>     <form-property 
>         name="lastName" 
>         type="java.lang.String" />
>     <form-property 
>         name="someFlag" 
>         type="java.lang.String" 
>         initial="false"
>         reset="true"/>
> </form-bean>
> Inside reset(), any property whose "reset" flag is set would be reset to its 
> initial value.
> This would require both a DTD change, and a way for the DynaActionForm to know 
> what form name it is configured for.  For this, FormBeanConfig's 
> createActionForm() can be modified to pass along the name onto the 
> DynaActionForm it creates.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org