Hello again,

I have a form with ajax validation on its component's 'onblur' and a sumit 
link. The submission process takes a while as it results in numerous database 
lookups and so on. Initially I used an IndicatingAjaxSubmitButton to show the 
user that their request was being processed, with the help of mailinglist and 
#wicket members I also disabled the link during the submission with an 
AjaxCallDecorator and I suppose I could always add a modal div over the whole 
site as well (in the same callDecorator) in order to stop users changing the 
form contents or navigating to another part of the site.

That all works fine however I need to push this further. If a user submits 
information which corresponds to a object that already exists in the database, 
I need to ask him whether he wishes to create a duplicate.

The way I see this working is as follows. The user submits a valid form by 
clicking the link. This results in a modal centered dialog with some loading 
animation being displayed. If the submission works the user is redirected to a 
'success' page where the entered data is display along with any information 
calculated during the submission. However if there is an error (an Exception 
thrown from the server) either a connection problem or duplicate data, the 
animation is replaced by some text explaining the problem and 1 or 2 buttons 
(Cancel for connection problems and Make Duplicate/Cancel for duplicate data). 
The Cancel button simply removes the modal window effectively returning the 
user to the form, whereas the Duplicate button launches the submission again 
and displays the animation until it succeeds or fails again in the case of 
connectivity problems.

I know this a lot to ask but has anyone got any idea how to achieve this as I'm 
getting a tad confused!

Many Thanks

Anthony

Reply via email to