Async Command Button multi submit

I have the following scenario:

In my portlet the user has to enter a number in an input field and press a button to start a search based on the entered number. The button fires 2 async requests to 2 different IS services and refreshs different sections of the portlet. The two request are very different, one request is a fast one the returns the request data within 1-2 seconds while the second one is a long running request that may take up to 30 sec to come up with response data. As default behavior the loading message is shown in the portal areas that haven’t yet refreshed.

The problem that I am facing is that some users don’t wait for the long running request to finish as they are only interested in the information that the fast services responds, so they already enter a new number and submit an new search request (multi submit) while the first long running request is still processed. This causes the new search request to wait until the first long running request is processed and after that the subsequent requests will be processed, this behavior is not acceptable by our end users as the waiting time for the end users to see the data from the last request might be very long.

So my question is how can I stop the processing of an already started async request so that the new search request can be processed immediately. Is there any option to achieve such behaviour.

Regards,
geko

Hi Geko,

I think your problem is more a usability one than a technical one.

Even if you manage to stop the async request - response in the browser, in the back-end the servers will still try to finish the job (a started SQL transaction for example).

You can offer to the users two buttons (one for short search, one for both). Or you can put next to the search button a checkbox ([x] Also do the long search) and only if the user checks it then you do both searches.

Probably this approach will take a lot of load off your servers.

br,
Vlad