RE: initial values and reset method relation

2006-11-27 Thread Strachan, Paul
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

Re: initial values and reset method relation

2006-11-27 Thread fea jabi
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

Re: initial values and reset method relation

2006-11-27 Thread Hubert Rabago
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 wor

initial values and reset method relation

2006-11-27 Thread fea jabi
quot;, 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. _ MSN S

Re: reset method with DyanValidatorForm

2006-11-01 Thread Niall Pemberton
;On 1/6/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: > >>On 1/6/06, fea jabi <[EMAIL PROTECTED]> wrote: > >> > >> > So, I might have to reset the checkboxes now. > >> > > >> > Do, I have no other choice but to create a formbean Class with a

Re: reset method with DyanValidatorForm

2006-11-01 Thread Niall Pemberton
; >> > Do, I have no other choice but to create a formbean Class with all the >> > setter's and getter's and then add reset method too for it. >> > >> > or is there an easier way to do this using DynaValidatorForm? >> >>You don't have t

Re: reset method with DyanValidatorForm

2006-11-01 Thread fea jabi
To: "Struts Users Mailing List" Subject: Re: reset method with DyanValidatorForm Date: Wed, 1 Nov 2006 15:35:44 + On 1/6/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: On 1/6/06, fea jabi <[EMAIL PROTECTED]> wrote: > So, I might have to reset the checkboxes now. > > Do,

Re: reset method with DyanValidatorForm

2006-11-01 Thread fea jabi
Great. thanks a lot for your help. From: "Wendy Smoak" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: Re: reset method with DyanValidatorForm Date: Wed, 1 Nov 2006 08:21:41 -0700 On 11/1/06, fea jabi <

Re: reset method with DyanValidatorForm

2006-11-01 Thread Niall Pemberton
On 1/6/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: On 1/6/06, fea jabi <[EMAIL PROTECTED]> wrote: > So, I might have to reset the checkboxes now. > > Do, I have no other choice but to create a formbean Class with all the > setter's and getter's and then add

Re: reset method with DyanValidatorForm

2006-11-01 Thread Wendy Smoak
On 11/1/06, fea jabi <[EMAIL PROTECTED]> wrote: may I know the reason why do we have to use Serializable in the below. >package com.example.myapp; >public final class AccountForm extends DynaValidatorActionForm >implements Serializable {...} You don't. DynaValidatorActionForm is already Se

Re: reset() method

2006-09-03 Thread Puneet Lakhina
. it calls reset method ( i have checked reset method is being called) but it does not reset the text box, i want to reset the form every time reset button is clicked. thank u There is a fundamental difference between reset and clear. reset button is used to set all the values in a form to the

Re: reset() method

2006-09-01 Thread nuwan chandrasoma
) and press reset, it clears form values. but if i follow these steps, reset does not work 1) enter some values in form 2) click submit button 3) validation fails 4) return to form 5) values are still in text box 6) here if i press reset button it does not reset the form values. it calls reset meth

reset() method

2006-09-01 Thread Sonu S
alues. but if i follow these steps, reset does not work 1) enter some values in form 2) click submit button 3) validation fails 4) return to form 5) values are still in text box 6) here if i press reset button it does not reset the form values. it calls reset method ( i have checked reset meth

Re: Controlling Reset method

2006-06-04 Thread chamal desilva
own, because of the > parent-child relationship, I > can provide a "Back" button which will re-populate > the ShowCustomerForm > with the customer ID (looked up through the account > ID), and the account > list will be displayed again. By separating > everything,

Re: Controlling Reset method

2006-06-04 Thread Scott Van Wart
wCustomerForm with the customer ID (looked up through the account ID), and the account list will be displayed again. By separating everything, you don't have to worry about what you keep in memory. Struts calls the reset() method on your form bean because it wants to use the form for some

Re: Controlling Reset method

2006-06-04 Thread chamal desilva
Dear Scott , Thanks for your reply. "If you're viewing the second account, why would you need data for the first account? If it's a problem of losing the customer ID for the " I need the first account data because it is in the Vector of Customer bean. So the first item(Account) of vector wil

Re: Controlling Reset method

2006-06-03 Thread Scott Van Wart
chamal desilva wrote: For examle let's think there are four Accounts in accounts vector. The first action displays this list on a JSP. User clicks on first account and views details. Then user goes back and clicks on second account. Then the data of first account object is reset and gets lost. Th

Controlling Reset method

2006-06-03 Thread chamal desilva
Hi, As I know the reset method of a form bean is called automatically when a action tries to add the form bean to session or retrieve it. Is there a way that we can stop the reset method being called. This is what I am

Re: reset method with DyanValidatorForm

2006-01-06 Thread Wendy Smoak
On 1/6/06, fea jabi <[EMAIL PROTECTED]> wrote: > So, I might have to reset the checkboxes now. > > Do, I have no other choice but to create a formbean Class with all the > setter's and getter's and then add reset method too for it. > > or is there an easier way

Re: reset method with DyanValidatorForm

2006-01-06 Thread fea jabi
reset the checkboxes now. Do, I have no other choice but to create a formbean Class with all the setter's and getter's and then add reset method too for it. or is there an easier way to do this using DynaValidatorForm? Thanks. From: Andre Van Klaveren <[EMAIL PROTECTED]> Reply

Re: reset method in ActionForm

2006-01-03 Thread Andre Van Klaveren
Q: When exactly this method has to be used and when does this get called? A: The reset method is called for each new request, for both request and session scoped ActionForms, before the ActionForm is populated from the request. Here's the sequence of events: 1. Request received by controll

Re: reset method in ActionForm

2006-01-03 Thread Ted Husted
have to be reset? > > > > Prepopulating the formbean is done in Action class. hence, it's not clear > to > > me the exact use of using the reset method. > > > > Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: reset method in ActionForm

2006-01-03 Thread Niall Pemberton
xes have to be reset? > > Prepopulating the formbean is done in Action class. hence, it's not clear to > me the exact use of using the reset method. > > Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

reset method in ActionForm

2006-01-03 Thread fea jabi
When exactly this method has to be used and when does this get called? Why do the checkboxes have to be reset? Prepopulating the formbean is done in Action class. hence, it's not clear to me the exact use of using the reset method. T

reset method of formbean

2005-08-10 Thread temp temp
I have an action which has a formbean in session scope . I want to reset this formbean whenever request is made to this action with a request parameter (say refresh). I have a reset method in the formbean which sets all the properties of this bean to null. In the action class I look

RE: Populating the ActionForm without using the reset method?

2005-06-30 Thread Thai Dang Vu
lto:[EMAIL PROTECTED] > Sent: Wednesday, June 29, 2005 10:27 AM > To: user@struts.apache.org > Subject: Populating the ActionForm without using the reset method? > > Hi all, > > Maybe I ask too much but I'm just a newbie in Struts and > nobody in my department c

Re: Populating the ActionForm without using the reset method?

2005-06-29 Thread Michael Jouravlev
On 6/29/05, Scott Piker <[EMAIL PROTECTED]> wrote: > It's pretty simple; you just need to populate the form bean and put it > into request/session scope prior to forwarding to your jsp when in edit > mode. You'll also need a hidden variable in your form to flag whether > you're in edit or add mode

RE: Populating the ActionForm without using the reset method?

2005-06-29 Thread Scott Piker
2005 10:27 AM > To: user@struts.apache.org > Subject: Populating the ActionForm without using the reset method? > > Hi all, > > Maybe I ask too much but I'm just a newbie in Struts and > nobody in my department can help me :( > > This is my situation: I have an input.jsp p

Populating the ActionForm without using the reset method?

2005-06-29 Thread Thai Dang Vu
ted with some values (for editing purpose)? For editing purpose, the values are undetermined beforehand so I couln't put them in the reset method. Sincerely. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: ActionForm::reset method

2005-06-08 Thread Rokibul Islam Khan
hi, if u want to prepopulate the form from form then the proper place is constructor but remember 2nd time u wouldn't get the form populated as to resuse the form actionservelet call the reset method befor resuing any existing form. so u can place same code into the reset method. the best w

Re: ActionForm::reset method

2005-06-08 Thread Janek Ziniewicz
ented." > > Hubert > > > On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > > My app contains a few forms. Each form has one ActionForm and one > > Action class associated. Each time page with form is displayed I see > > that ActionForm::reset

Re: ActionForm::reset method

2005-06-08 Thread Hubert Rabago
ted. Each time page with form is displayed I see > that ActionForm::reset method is displayed. After submitting I can see > that reset method is launched again, and right after that > ActionForm::execute. > > Is it proper behaviour? > > -- > Pozdrawiam, > J

ActionForm::reset method

2005-06-08 Thread Janek Ziniewicz
My app contains a few forms. Each form has one ActionForm and one Action class associated. Each time page with form is displayed I see that ActionForm::reset method is displayed. After submitting I can see that reset method is launched again, and right after that ActionForm::execute. Is it proper

Re: Session Scope-Form Bean Reset Method Executing Every Request

2005-05-08 Thread Aladin Alaily
Hi Mehmet, The reset method of your form bean will be executed every time it passes through the controller on a redirect, which is handled as a new request. As such, if you do not want to have the reset method called you should forward your pages rather than redirecting them (I don't

Re: Session Scope-Form Bean Reset Method Executing Every Request

2005-05-08 Thread Adam Hardy
On 08/05/05 13:09 Mehmet E. wrote: Form Bean scope is session. In every request form bean RESET method is executing. I am useing struts with tiles. There is no code for removing form bean from session. As i know, it must execute one times per session after creation of form bean. Mehmet, I never

Session Scope-Form Bean Reset Method Executing Every Request

2005-05-08 Thread Mehmet E.
Form Bean scope is session. In every request form bean RESET method is executing. I am useing struts with tiles. There is no code for removing form bean from session. As i know, it must execute one times per session after creation of form bean. Thanks

Re: Reset Method in ActionForm

2005-02-26 Thread Larry Meadors
in a one-to-one relationship with a page on the other hand, it is probably OK, but as Jeff noted, probably not the best way. I mean think about it...what are you resetting? :-) Larry On Fri, 25 Feb 2005 15:07:36 -0500, Evan Cooney <[EMAIL PROTECTED]> wrote: > I am using the reset met

Re: Reset Method in ActionForm

2005-02-25 Thread Jeff Beal
I think that the best sentence to explain when to use the reset method comes from the JavaDoc: "In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form." Based on that, I would say that your usage is an inconsistent usage of

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? T

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? T

Re: reset method causes values not displaying

2004-10-27 Thread Jeff Beal
Implement the Cloneable interface on your ActionForm and call XXX newForm = (XXX)oldForm.clone(). Read the JavaDoc on Cloneable and the Object.clone() method for more information. -- Jeff dmu2201 wrote: Sebastian Ho wrote: Now this is a Java question, if "XXX newForm = (XXX) form" resulted in f

Re: reset method causes values not displaying

2004-10-27 Thread dmu2201
Sebastian Ho wrote: Now this is a Java question, if "XXX newForm = (XXX) form" resulted in form and newForm having the same memory space? How do I really make a duplicate copy with different memory space (beside using new, or is new the only solution)? Sebastian Ho Since this is Java and not C

Re: reset method causes values not displaying

2004-10-27 Thread Sebastian Ho
ngely the new ActionForm is not displayed in the JSP returned by > >ActionForward. It only appears if the ActionForm reset is not called > >before returning the method. > > > >How can the reset method affect my codes? > > > >and yes, the values was

Re: reset method causes values not displaying

2004-10-27 Thread dmu2201
appears if the ActionForm reset is not called before returning the method. How can the reset method affect my codes? and yes, the values was printed out before returning and all the values are there.. Why is that so? Thanks Sebastian Ho

reset method causes values not displaying

2004-10-27 Thread Sebastian Ho
ActionForm reset is not called before returning the method. How can the reset method affect my codes? and yes, the values was printed out before returning and all the values are there.. Why is that so? Thanks Sebastian Ho - public