struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pc leung <pingcheu...@gmail.com>
Subject Re: How to clear DynaActionForm?
Date Wed, 09 Nov 2005 14:34:20 GMT
Thnx

On 11/9/05, Hubert Rabago <hrabago@gmail.com> wrote:
> You can set the form's scope to "request".  This way, the values don't
> survive from one request to the next.
>
> Hubert
>
> On 11/8/05, pc leung <pingcheungl@gmail.com> wrote:
> > even the following cannot clear fields in
> > <form-bean name="userProfileForm"
> > type="org.apache.struts.validator.DynaValidatorForm" >
> >             <form-property name="engName" type="java.lang.String" />
> >             <form-property name="chiName" type="java.lang.String" />
> >
> >
> > DynaActionForm userProfileForm = (DynaActionForm)form;
> > ...
> > userProfileForm.set("chiName", "");
> > userProfileForm.set("engName", "");
> > return mapping.findForward("success");
> >
> > How can the form's fields be cleared after input successfully?
> >
> > Thanks
> >
> >
> > On 11/7/05, pc leung <pingcheungl@gmail.com> wrote:
> > > struts-config.xml:
> > > <form-bean name="userProfileForm"
> > > type="org.apache.struts.validator.DynaValidatorForm" >
> > >
> > >
> > > DispatchAction class:
> > > DynaActionForm userProfileForm = (DynaActionForm)form;
> > > ...
> > > userProfileForm.reset(mapping, request);
> > > return mapping.findForward("success");
> > >
> > > The reset function does not clear form.
> > > How it be cleared?
> > >
> > > Thanks
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Mime
View raw message