You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastien Briquet (JIRA)" <ji...@apache.org> on 2012/04/29 12:32:50 UTC

[jira] [Created] (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).

Sebastien Briquet created WICKET-4525:
-----------------------------------------

             Summary: 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


- 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Sebastien Briquet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265398#comment-13265398 ] 

Sebastien Briquet commented on WICKET-4525:
-------------------------------------------

Hi Dan, hi Carl (and congratulations !), Hi Igor

As I mentioned in the mail, I simplify the quickstart (as much I could). And as I comment in the quickstart, the behavior is not used in a "onclick" attribute but rather in a jQuery object. In fact, do not use the AttributeModifier; the real code is much closer to:
buider.append("function() { ").append(behavior.getCallbackScript()).append(" }");

I am afraid I can not use a Model here. But it's also possible that behavior are not designed to work like this...
But, in this case, I am afraid (for me) but probably for other developer that may have used this technic...

Sorry for the confusion,
Cheers,
Sebastien.
                
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Dan Retzlaff (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265377#comment-13265377 ] 

Dan Retzlaff commented on WICKET-4525:
--------------------------------------

Sebastien, if you use an IModel for your attribute modifier, then your javascript will get the latest behavior version, i.e.
	this.add(AttributeModifier.replace("onclick", new AbstractReadOnlyModel<String>() {
		@Override
		public String getObject() {
			return behavior.getCallbackScript().toString();
		}
	}));

Not sure exactly why 1.5.6 is different.
                
> 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
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (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).

Posted by "Sebastien Briquet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastien Briquet updated WICKET-4525:
--------------------------------------

    Attachment: quickstart.zip
    
> 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
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Sebastien Briquet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265418#comment-13265418 ] 

Sebastien Briquet commented on WICKET-4525:
-------------------------------------------

Understood, thank you very much!
                
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265406#comment-13265406 ] 

Igor Vaynberg commented on WICKET-4525:
---------------------------------------

for these kinds of cases you have to use wicket's ajax mechanism to do the callback.

or, wire your function to read the url out of a js variable, and update that js variable with a fresh url on every render.
                
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265387#comment-13265387 ] 

Carl-Eric Menzel commented on WICKET-4525:
------------------------------------------

Wouldn't the quickstart code (without the model) always point to the old behavior? I'm not too deeply in versioning in 1.5 yet, but superficially this sounds to me like this shouldn't work without the model. Which makes me wonder why it worked before 1.5.6.
                
> 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
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (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).

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-4525.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

correct. this should *not* be used without models. urls should be refreshed on every render, otherwise you may have a url that points to an old page version, nevermind the render count, and then all kinds of things will break. it "worked" in 1.5.5 by pure luck or lack of serious testing.
                
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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).

Posted by "Carl-Eric Menzel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265390#comment-13265390 ] 

Carl-Eric Menzel commented on WICKET-4525:
------------------------------------------

And I can confirm that it does work *with* the model.
                
> 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
>         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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira