Re: Attributes Initialization

2005-01-07 Thread Eli Segev
Wendy, I finally figured it. The issue is validation as suggested by Jason Lea. What I did not know was that to stop validation you have to add validation="false" since the default value for validation is true. Just omitting the validation from the action is not enough. Thanks for all the inp

Re: Attributes Initialization

2005-01-07 Thread Wendy Smoak
From: "Eli Segev" <[EMAIL PROTECTED]> > Validation for the init action is off. Its 'execute' method has no call to super.execute(). > This still does not solve the problem. At this point, since everything you've posted *looks* like it should work, I'd suggest that you strip the project down to th

Re: AW: Attributes Initialization

2005-01-07 Thread Eli Segev
. > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:user- > [EMAIL PROTECTED] Im Auftrag von Eli > Segev > Gesendet: Donnerstag, 6. Januar 2005 23:40 > An: Struts Users Mailing List > Betreff: Re: Attributes Initialization > > I am aware that my 'r

RE: Attributes Initialization

2005-01-07 Thread Eli Segev
mitAction" > input="/submit.jsp" > name="submitForm" > scope="request" > validate="true"> > > Which will forward to your successful submit page. > > Which of these is not having the execute method being executed? > >

RE: Attributes Initialization

2005-01-07 Thread Eli Segev
PROTECTED] Sent: Thursday, January 06, 2005 7:38 PM To: Struts Users Mailing List Subject: RE: Attributes Initialization David, Here it is: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { Any comments? "Dav

AW: Attributes Initialization

2005-01-07 Thread Leon Rosenberg
; An: Struts Users Mailing List > Betreff: Re: Attributes Initialization > > I am aware that my 'redirect' does not make sense. But, this is a > different issue. My question is why the initial action does not invoke > the 'execute' method. It has to do w

RE: Attributes Initialization

2005-01-07 Thread Jim Barrows
> -Original Message- > From: Eli Segev [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 06, 2005 5:13 PM > To: Struts Users Mailing List > Subject: RE: Attributes Initialization > > > Jim, > > The 'execute' method of 'SetupSubmitAction&

RE: Attributes Initialization

2005-01-06 Thread David G. Friedman
Eli, Where is the throws clause to match the proper signature? Regards, David -Original Message- From: Eli Segev [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 7:38 PM To: Struts Users Mailing List Subject: RE: Attributes Initialization David, Here it is: public

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
Jason, I tried your idea without any success. I start with the init page without any validation. Thanks. Jason Lea <[EMAIL PROTECTED]> wrote: 1. From what I see here you redirect from index.jsp to submit.do. 2. The submit.do action is defined to have validation. 3.*My guess* is that validat

RE: Attributes Initialization

2005-01-06 Thread Eli Segev
05 7:13 PM To: Struts Users Mailing List Subject: RE: Attributes Initialization Jim, The 'execute' method of 'SetupSubmitAction' is never called. The 'execute' method of 'SubmitAction' is called after pressing the 'submit' button. I think t

Re: Attributes Initialization

2005-01-06 Thread Jason Lea
1. From what I see here you redirect from index.jsp to submit.do. 2. The submit.do action is defined to have validation. 3.*My guess* is that validation fails, and you are returned to your input page (input="submit.jsp") and the execute method is *not* executed 4. You submit a form from submit.

RE: Attributes Initialization

2005-01-06 Thread David G. Friedman
EMAIL PROTECTED] Sent: Thursday, January 06, 2005 7:13 PM To: Struts Users Mailing List Subject: RE: Attributes Initialization Jim, The 'execute' method of 'SetupSubmitAction' is never called. The 'execute' method of 'SubmitAction' is called after pressi

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
Wendy, I know that the method is not executed, because I put a 'print' statement as the first line in the method. The 'print' statement does not appear initially in Tomcat. It does appear only after submitting the form. I also added a no-arg constructor for the action class. It is used onl

Re: Attributes Initialization

2005-01-06 Thread Wendy Smoak
From: "Eli Segev" <[EMAIL PROTECTED]> > index.jsp redirect to 'submit', which is defined as a global forward as 'submit.do'. If you're redirecting to submit.do, given the configuration you've posted, SubmitAction should be executing. What do you have in execute()? Why do you think it _isn't_ ex

RE: Attributes Initialization

2005-01-06 Thread Eli Segev
t's url: /submit.do type="segev.SubmitAction" input="/submit.jsp" name="submitForm" scope="request" validate="true"> Which will forward to your successful submit page. Which of these is not having the execute method being executed? >

RE: Attributes Initialization

2005-01-06 Thread Jim Barrows
ge. Which of these is not having the execute method being executed? > -Original Message- > From: Eli Segev [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 06, 2005 3:40 PM > To: Struts Users Mailing List > Subject: Re: Attributes Initialization > > > I am awar

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
The property in this particular case is a list of beans. I have not yet found how to initialize a list in struts-config.xml. Janarthan Sathiamurthy <[EMAIL PROTECTED]> wrote: Hi, In the form bean definition in struts-config.xml, when u r defrining a property, you can use - So whenever the f

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
I am aware that my 'redirect' does not make sense. But, this is a different issue. My question is why the initial action does not invoke the 'execute' method. It has to do with redirect, but how? Having two actions, one for initialization and one for submit will not resolve this situation, s

Re: Attributes Initialization

2005-01-06 Thread Wendy Smoak
From: "Eli Segev" <[EMAIL PROTECTED]> > Here is the portion that defines the action: > > type="segev.SubmitAction" > input="/submit.jsp" > name="submitForm" > scope="request" > validate="true"> > >

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
Wendy, Here is the portion that defines the action: Obviously this definition does not make the initial action go through the 'execute' method. I don't know what changes are necessary here. Any suggestions? The starting page is index.jsp that looks like

Re: Attributes Initialization

2005-01-06 Thread Janarthan Sathiamurthy
Hi, In the form bean definition in struts-config.xml, when u r defrining a property, you can use - So whenever the form bean will be used, for the field 'myField', struts will populate its value as 'THIS_VALUE_WILL_BE_DISPLAYED' Best Regards, Janarthan S Richard Yee <[EMAIL PROTECTED]> wr

Re: Attributes Initialization

2005-01-06 Thread Wendy Smoak
From: "elisegev1" <[EMAIL PROTECTED]> > Can anyone suggest why the 'execute' is never called before the > initial display of the form? What URL do you use to get the initial display of the form? It sounds like you're allowing direct access to the JSP rather than forcing everything to go through a

Re: Attributes Initialization

2005-01-06 Thread Eli Segev
Richard, Thanks for the suggestion. An action is already defined in struts-config.xml with two 'forward' definitions - 'success' and 'failure'. Is there an 'initialize' forward? Richard Yee <[EMAIL PROTECTED]> wrote: It is because the action class execute method is only executed when the

Re: Attributes Initialization

2005-01-05 Thread Richard Yee
It is because the action class execute method is only executed when the form is submitted, not when it is displayed. If you want to pre-load the form, you need to create an action and either forward or redirect to the action which then forwards to the page that displays the form. -Richard At 11

Re: Attributes Initialization

2005-01-05 Thread Cliff
Hi, May be you can try to use the reset() in the Form. Good Luck Cliff - Original Message - From: "elisegev1" <[EMAIL PROTECTED]> To: Sent: Thursday, January 06, 2005 3:12 AM Subject: Attributes Initialization > > I have a form that needs some initialization

Attributes Initialization

2005-01-05 Thread elisegev1
I have a form that needs some initialization. The form is derived from DynaValidatorForm and its properties are defined in struts- config.xml. I initialize an attribute in the 'execute' method of my 'Action' class. For some reason when the servlet container creates the page for the first tim