File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Avoiding multiple request at a time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Avoiding multiple request at a time" Watch "Avoiding multiple request at a time" New topic

Avoiding multiple request at a time

Selva Varadhan

Joined: Aug 20, 2005
Posts: 14

Scenario :
In my application, i have the page, contains two buttons like Previous and Next button.

User Action:

[1] User clicks Next button (Submit Action )
[2] Before the response reached the Browser, user clicks previous button.

Issue :
This kind of action some time leads to inconsistant stage.
How to handle the user action, when one request is in processing stage.I don't want to disable the button.

Plz proivde some solution to handle this situation

Selva varadhan
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
how about a javascript method that is called by the onclick handler of the html:submit

this requires the client to have javascript enabled, and that the page to be reloaded between when submits are clicked. (or some other means to reset the formSubmitted flag).

Error: Keyboard not attached. Press F1 to continue.
I agree. Here's the link:
subject: Avoiding multiple request at a time
jQuery in Action, 3rd edition