Hi,

According the struts documentation the default implementation of reset()
does nothing, so calling super() will have no effect.  When you override
a method it is up to you to call super() or not, in this case I do not
believe it is required.

You only need to reset form elements that DO NOT submit a value when not
checked (eg checkboxes) - I *think* this is only an issue for session
scoped forms.

HTH



-----Original Message-----
From: fea jabi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 28 November 2006 9:29 AM
To: user@struts.apache.org
Subject: Re: initial values and reset method relation

Thanks for your response.  yes, I am using reset method only for
resetting 
the checkboxes. With all your help now I understand the reset method.

What I want to know is, in reset method in my formbean do I have to call
the 
super.reset() ???

When initialize is used on a form property and if super.reset() method
is 
not used, in the reset method, will there be any problems/issues. Would
like 
to know about this.

I wrote the reset method without calling super.reset() statement. But I
was 
told that I need to call super.reset() from the reset method of
formbean. I 
was not clear on why I need to do this. Trying to get answers for this.

Thanks.


>From: "Hubert Rabago" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: "Struts Users Mailing List" <user@struts.apache.org>
>Subject: Re: initial values and reset method relation
>Date: Mon, 27 Nov 2006 11:09:50 -0600
>
>If you consult the documentation for the reset() method [1], you'll
>see it's mainly for resetting checkbox values:
>
>"This method is not the appropriate place to initialize form value for
>an "update" type page (this should be done in a setup Action). You
>mainly need to worry about setting checkbox values to false; most of
>the time you can leave this method unimplemented."
>
>Hubert
>
>[1] 
>http://struts.apache.org/1.x/struts-core/apidocs/org/apache/struts/acti
on/ActionForm.html
>
>On 11/27/06, fea jabi <[EMAIL PROTECTED]> wrote:
>>Have the below in the form bean.
>>
>>
>>     public void reset(ActionMapping mapping,
>>                                 javax.servlet.http.HttpServletRequest

>>request) {
>>                 super.reset(mapping, request);
>>                 set("empCost", Boolean.FALSE);
>>         set("orders", Boolean.FALSE);
>>     }
>>
>>
>>Is it required to call the super.reset()?
>>
>>How is it related to the initialize values?
>>
>>What happens if we don't call the super.reset() in the above reset
method
>>and have
>>initial values?
>>
>>Thanks.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
Stay up-to-date with your friends through the Windows Live Spaces
friends 
list. 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http:/
/spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to