> -----Original Message-----
> From: Jen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 29, 2004 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: newbie question: form initialization and process
> 
> 
> Hi, 
> I am new to Struts and after browsered the nightly
> build example app, found it did different way with
> what I have.
> In example app the forms's initial display action is
> different from the form's submit action. 

This is somewhat typical.  ShowFormAction->form.jsp->SubmitFormAction.

> what if after
> the form submission, it needs to forward to a jsp
> which is form too, where can I do the initial work for
> the second jsp? 

Not sure what you mean here, but if I understand you correctly, you don't do work in 
jsps.

>For mine, every page will need some
> sort of initialization, and then the page is submitted
> to itself and do the process. 

Nope, no submitting to itself in struts land :)  
All processing is done in actions.  

> Second, my form all have confirm page, that is after
> the form submitted, goesto a page show all the
> inofrmation user just entered, and it have edit and
> submit button, does this page needs a form too? 

What you're looking for is:
ShowFormAction->form.jsp->SubmitAction->confirmation.jsp->FinalSubmitAction->some.jsp
If you don't want to do this in two actions, you can include a hidden field in the 
form to indicate that
the form has/has not been verified, and have the submit action check for that and do 
things appropriately.

No, no separate form bean.

>what
> action should the eidt button go?

Back to the ShowFormAction is probably best, although you could go back to the 
form.jsp page.

> Thanks

You're welcome, hth.

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

Reply via email to