I apologize for the confusion please let me rephrase my questions.
1. Here's our application requirement:
when user modifies a page, say A and clicks on any other menu
item or link, say B without clicking any button on the modified page
A, page A needs to be automatically saved. If there is nothing wrong
during save, end user should be redirected to page B, otherwise page
A should stay with error messages.
2. I'm trying to refactor our existing struts 1.2 based application
to support the above requirement, but I have a hard time to make it
work. Here are my challenges:
a. How can I sequentialize the two action submits? (one is to
submit the modified page using javascript method 'onunload', the
other one is to submit the menu item user clicked). If I don't
sequentialize them, I don't know how to fullfill the requirement.
Thanks and I appreciate all your help!
Nancy
--- Erik Weber <[EMAIL PROTECTED]> wrote:
> Nancy, could you try to be a little more specific and clearer in
> your
> explanations?
>
> Nancy Lin wrote:
>
> >Our application required that if user enter some data and click on
> >other menu link or tab without clicking the submit button, the
> page
> >will automatically be save.
> >
> Do you mean that you are submitting the form anyway, using
> JavaScript,
> just with a different action mapping?
>
> >The problem is it is causing double
> >submit, first the save submit action will be called and then the
> menu
> >link action that user want to go to.
> >
> So I take it the first submit happens when the user clicks a link
> (instead of the submit button), and JavaScript is submitting the
> form
> (for a save action and not a normal submit action). Correct? So
> how/when
> does the second submit come into play? Doesn't your action process
> the
> first submit and then forward to the page the user wanted? Or are
> you
> using a redirect? Even so, a redirect would only be a GET request,
> so I
> don't understand the double submit.
>
> > But since xml configuration
> >tells where to go when the save submit action is sucessful, the
> >second action never gets called.
> >
> >
> Hmm, this seems to contradict what you just said. I don't
> understand.
>
> Erik
>
>
> >Anyone have similar application that required this implied save?
> Any
> >solution or suggestion are welcome.
> >
> >Thanks.
> >Cometcosmo
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam? Yahoo! Mail has the best spam protection around
> >http://mail.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]