>> 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.
What I want to say is normally SubmitFormAction will
return a jsp page, but this returned jsp page(let's
call it form2.jsp) also needs initialize, so route
will be:
ShowFormAction->form.jsp->SubmitFormAction->ShowForm2Action->for2.jsp->SubmitForm2Action
so every submit action will return an action instead
of a jsp page. potentially the number of actions
double the number of form jsps. what I do in my own
models, my handler handles both initialize and
process.
>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.
For my case, the confirmation.jsp is not really form,
it just shows all the information in text, ie, no
input text box, only text; no selection list, only
show waht user selected. I guess I have to make the
form to be session scope?
>>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.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]