struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <jbarr...@sssc.com>
Subject RE: Attributes Initialization
Date Fri, 07 Jan 2005 15:48:15 GMT


> -----Original Message-----
> From: Eli Segev [mailto:elisegev1@yahoo.com]
> Sent: Thursday, January 06, 2005 5: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 that you are suggesting to have two 'actions' with 
> the same form.  One to initialize and one to process.  For 
> some reason the first action (initialization) does not invoke 
> the 'execute' method.  I don't know why at this point. 

That's exactly what I'm suggesting.
Okay, this happens when
1) The form is invalid, turn validation off on the setup action mapping
2) The url is NOT being mapped to the action.  Configuration issue.
3) The super.execute is being called and it's not returning to your execute method.  Make
sure that the signatures are the same, and don't call the super.execute.


> 
> 
> Jim Barrows <jbarrows@sssc.com> wrote:
> Okay, let's see if I can try....
> 
> You type into the browser:
> /context/setupSubmit.do 
> 
> Which you have mapped to:
> type="segev.SetupSubmitAction"
> input="/submit.jsp"
> name="submitForm"
> scope="request"
> validate="true">
> 
> Which should struts-forward to /submit.jsp.
> Then when you click the submit button, the form has as it'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?
> 
> 
> > -----Original Message-----
> > From: Eli Segev [mailto:elisegev1@yahoo.com]
> > Sent: Thursday, January 06, 2005 3:40 PM
> > To: Struts Users Mailing List
> > Subject: 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 with 
> > redirect, but how? Having two actions, one for 
> > initialization and one for submit will not resolve this 
> > situation, since the 'execute' method is not called. I am 
> > still looking to find out what I am doing wrong about this.
> > 
> > index.jsp redirect to 'submit', which is defined as a global 
> > forward as 'submit.do'. I can define it as 'submit.jsp', but 
> > there is no difference in behavior.
> > 
> > 
> > 
> > Wendy Smoak wrote:
> > 
> > From: "Eli Segev" 
> > > Here is the portion that defines the action:
> > >
> > > > type="segev.SubmitAction"
> > > input="/submit.jsp"
> > > name="submitForm"
> > > scope="request"
> > > validate="true">
> > > 
> > > 
> > > 
> > 
> > (Why have three different forwards pointing at the same page? 
> > No matter if
> > you call mapping.getInputForward(), 
> mapping.findForward("success") or
> > mapping.findForward("failure"), you're going to end up at the 
> > same place!)
> > 
> > > 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?
> > 
> > If you're going to do it this way, with a separate Action for 
> > submit, then I
> > suppose you'd need a PrepareAction to go with it.
> > 
> > > The starting page is index.jsp that looks like this:
> > > 
> > > 
> > 
> > And this redirects them... where? Is it submit.do or submit.jsp that
> > appears in the browser? (Since it's a redirect, the browser 
> URL should
> > change.)
> > 
> > -- 
> > Wendy Smoak
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail - Helps protect you from nasty viruses.
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 
> 		
> ---------------------------------
> Do you Yahoo!?
>  Meet the all-new My Yahoo! - Try it today! 
> 

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


Mime
View raw message