On 4/27/05, Nancy Lin <[EMAIL PROTECTED]> 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.

What is the point in submit button then? Maybe you would rather show a
dialog "Do you want to save the changes?" then allow user to save, and
then he would click the menuitem.

> 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.  But since xml configuration
> tells where to go when the save submit action is sucessful, the
> second action never gets called.
> 
> Anyone have similar application that required this implied save? Any
> solution or suggestion are welcome.

I would say that problem that you have is not what usually is called
"double submit". Right off the bat I can think of the following
choices (unless you want to show dialog window and to do save in two
separate steps).

* When menuitem is clicked, append a parameter to submit action URL,
which would define where to go next on success, and submit the form to
save action. Just a small javascript.

* Submit form to the target menuaction and save data from there. In
this case you would have to process request manually (maybe use
LazyAction from 1.2.6? Not sure, not used it).

Michael.

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

Reply via email to