You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2010/03/14 02:02:27 UTC

[jira] Created: (WICKET-2783) FormTester.submit does not work with AjaxButtons

FormTester.submit does not work with AjaxButtons
------------------------------------------------

                 Key: WICKET-2783
                 URL: https://issues.apache.org/jira/browse/WICKET-2783
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.7
            Reporter: Tony Wu


FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Tony Wu updated WICKET-2783:
----------------------------

    Attachment: wicket-ajax-submit-bug.zip

It seems the workaround per the attachment is to use executeAjaxEvent with onClick instead of FormTester.submit(). Although, another issue comes up this way:

If I override the Form's process function to disable components (say to disable some component's validators based on what the submitting button is), those components are still enabled and unfortunately validators still run for them. I've attached a quickstart which shows this issue.

The AjaxFallbackButton's onSubmit println "Submitted - successful!" only shows up when running through a normal browser. Through WicketTester, the onSubmit never runs since the form's process throws errors on the RequiredTextField - even if in that form process, RequiredTextField is explicitly disabled.

> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>         Attachments: wicket-2783.tgz, wicket-ajax-submit-bug.zip
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Tony Wu edited comment on WICKET-2783 at 3/15/10 10:31 PM:
-----------------------------------------------------------

Also want to add that moving the TextField disable (this.textField.setEnabled(false)) outside of the MyForm process function and into the constructor makes the unit test work. So somehow, dynamically setting the TextField.setEnabled(false) inside process doesn't work in WicketTester for ajax onclick submits, but works fine in the browser and normal unit test submits (non-ajax).

      was (Author: e90tony):
    Also want to add that moving the TextField disable (this.textField.setEnabled(false)) outside of the MyForm process function and into the constructor makes the unit test work. So somehow, dynamically setting the TextField.setEnabled(false) inside process doesn't work in WicketTester for ajax onclick submits, but works fine in the browser.
  
> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>         Attachments: wicket-2783.tgz, wicket-ajax-submit-bug.zip
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Martin Grigorov updated WICKET-2783:
------------------------------------

    Attachment: wicket-2783.tgz

See attached project. It seems to work ok.

If the attached project misses something then please provide one that fails.

> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>         Attachments: wicket-2783.tgz
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Hudson commented on WICKET-2783:
--------------------------------

Integrated in Apache Wicket 1.4.x #129 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/129/])
    

> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.11, 1.5-M2
>
>         Attachments: wicket-2783.tgz, wicket-ajax-submit-bug.zip
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Tony Wu commented on WICKET-2783:
---------------------------------

Also want to add that moving the TextField disable (this.textField.setEnabled(false)) outside of the MyForm process function and into the constructor makes the unit test work. So somehow, dynamically setting the TextField.setEnabled(false) inside process doesn't work in WicketTester for ajax onclick submits, but works fine in the browser.

> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>         Attachments: wicket-2783.tgz, wicket-ajax-submit-bug.zip
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2783) FormTester.submit does not work with AjaxButtons

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

Igor Vaynberg resolved WICKET-2783.
-----------------------------------

         Assignee: Igor Vaynberg
    Fix Version/s: 1.4.11
                   1.5-M2
       Resolution: Fixed

> FormTester.submit does not work with AjaxButtons
> ------------------------------------------------
>
>                 Key: WICKET-2783
>                 URL: https://issues.apache.org/jira/browse/WICKET-2783
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Tony Wu
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.11, 1.5-M2
>
>         Attachments: wicket-2783.tgz, wicket-ajax-submit-bug.zip
>
>
> FormTester.submit on an AjaxButton (AjaxFallbackButton) does not cause the button's onSubmit function to run, nor the form's process function to run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.