Hi again,
just to clarify,
i'm talking about reset method inside any form that is a subclass of
this one below:

http://struts.apache.org/1.x/apidocs/org/apache/struts/action/ActionForm.html#reset(org.apache.struts.action.ActionMapping,
javax.servlet.http.HttpServletRequest)

and on every request to action this reset method is being called (for
reseting checkboxes - most common scenario).
I'm not familiar with any conditions like new session or anything else
that would prevent this behaviour,
but i'm not a struts1 guru so maybe i'm simply wrong.

As for setting session param, it states that this form will be used
across one session,
it only means that this form will be creted when user/session makes first call
and then used in all other actions where it is defined - good for
wizard like scenarion,
nothing less nothing more,
still reset method in form object will be called on every request.


Best greetings,
Paweł Wielgus.


2009/8/29 sharadsingh <sharad1...@gmail.com>:
>
> thanks Pawel for the help.. in the previous mail you told me about
> configuring. So i was just going through my struts-config file where i saw
> that i didnt specified the scope in the action mapping. Then i realized that
> reset is called whenever there is a new session, which means by default the
> scope was set to session, so i applied the attribute scope with "request"
> and it started working fine as it works for you :)
>
> Paweł Wielgus wrote:
>>
>> Hi,
>> i was thinking about redirect scenario where You load some page
>> through a redirect so there are two actions involved,
>> and after redirect only one action is called. But that's just a wild
>> guesing, so please send struts-config.xml and the action that You are
>> reffering and form, so maybe i or someone else will see something that
>> is not wright. Normally it should work as You expect, because this is
>> normal/standard struts behaviour.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>>
>> 2009/8/29 sharadsingh <sharad1...@gmail.com>:
>>>
>>> well all the points you said is ok for me the only thing i dont know
>>> about is
>>> the configuration. What kind of configuration you are talking about?
>>> Actually i am quite new to struts and so may be i dont know about some
>>> in-depth concepts.
>>>
>>>
>>> Paweł Wielgus wrote:
>>>>
>>>> Hi,
>>>> if it's not browser fault,
>>>> then maybe configuration,
>>>> are You dealing with redirect in this case?
>>>> Or maybe You have some king of logic inside form's reset method.
>>>> One another thing is action beeing defined twice with two different
>>>> forms?
>>>>
>>>> Other than that i don't know,
>>>> reset works always for me.
>>>>
>>>> Best greeitings,
>>>> Paweł Wielgus.
>>>>
>>>> 2009/8/28 sharadsingh <sharad1...@gmail.com>:
>>>>>
>>>>> well i applied break points on both "actionform" and "action" of the
>>>>> form
>>>>> and
>>>>> did both refresh and brand new request. It is been caught in both the
>>>>> times
>>>>> with the break point in the action but not in the actionform
>>>>>
>>>>> Paweł Wielgus wrote:
>>>>>>
>>>>>> Hi,
>>>>>> what do You mean by saying:
>>>>>> "if i try to open the page again"
>>>>>> what does that mean for real?
>>>>>> hitting F5 or refresh button in browser?
>>>>>> or a real brand new request.
>>>>>>
>>>>>> Best greetings,
>>>>>> Paweł Wielgus.
>>>>>>
>>>>>>
>>>>>> 2009/8/28 sharadsingh <sharad1...@gmail.com>:
>>>>>>>
>>>>>>> i have an action form which i use to collect form data and also to
>>>>>>> set
>>>>>>> them
>>>>>>> back by populating the variables in the reset method. But the problem
>>>>>>> is
>>>>>>> that the reset method is been called only the first time i am opening
>>>>>>> the
>>>>>>> page which contains that form, if i try to open the page again the
>>>>>>> reset
>>>>>>> method wont be called at all. Please suggest me on this..,
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/ActionForm-is-been-called-once-only-tp25186640p25186640.html
>>>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/ActionForm-is-been-called-once-only-tp25186640p25187345.html
>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/ActionForm-is-been-called-once-only-tp25186640p25200449.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/ActionForm-is-been-called-once-only-tp25186640p25202296.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

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

Reply via email to