[
https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebastien Briquet closed WICKET-4525.
-------------------------------------
> Behavior (which performs a form post) not executed the second time if the
> form contains a required field (which failed the first time).
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4525
> URL: https://issues.apache.org/jira/browse/WICKET-4525
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.6
> Environment: Tested with Tomcat 7 / Jetty 7.5, Firefox 12.0 / Chrome
> 18.0 (OS: Kubuntu 11.10)
> Reporter: Sebastien Briquet
> Assignee: Igor Vaynberg
> Attachments: quickstart.zip
>
>
> - Use case -
> Just to summarize the - real - use case: I have a button which makes the user
> confirming the form post - before it is being sent - through a dialog box.
> That means that the button that is displayed does not post the form by itself
> but delegates the action. To achieve this, an ajax-button (which has
> setDefaultFormProcessing set to false) opens the dialog box at its onSubmit
> event. The dialog has an AbstractDefaultAjaxBehavior which will be called on
> the onclick dialog-confirm-button's event (because it looks like a button but
> is not a Wicket one). The respond() method of this behavior then attaches a
> "submit()" javascript command (jQuery, but it can be replaced by a standard
> javascript here) to the AjaxRequestTarget, which is executed on client side
> and then the form is submitted over http (non-ajax, then).
> - Symptoms -
> According that the form also has a RequiredTextField (because it makes more
> sense to send a form that contains form-elements), there is an issue when the
> user starts by NOT entering a value before posting the form.
> In that case, the form will be sent (for the first time) and the validation
> will fail as expected. But after that, on successive calls, the form never
> triggers events anymore (for instance Form#onFormSubmitted()).
> Visually, the form *seems* to be sent (and the page is refreshed), but it's
> looks like the behavior script transmitted to the client is not executed (the
> page is immediately re-rendered after the "Invoking pre-call handler(s)..."
> step)
> Where it is weird, is that when the user begins by entering a value, send the
> form, remove the value, resend the form, set a value again, resend, etc. All
> is working. Just in the case where, at the very first try, no value is set,
> then the issue appears.
> - Quickstart -
> In the attached quickstart, the "confirm-button" described above has been
> replaced by a Label which will apply the same technic as describe above.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira