You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/06/25 22:49:26 UTC

[jira] Resolved: (WICKET-254) Allow to set field values before submitting a form with Ajax in WicketTester

     [ https://issues.apache.org/jira/browse/WICKET-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Quenot resolved WICKET-254.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.3.0-beta3)
                   1.3.0-beta2

Fixed, thanks for reporting!  WicketTester was overwriting field values in two places when submitting via Ajax.

Be aware however that you needed to call Session.get.cleanupFeedbackMessages() after each test, and that the TextField needed setRequired(true) to satisfy the third test with empty string.

> Allow to set field values before submitting a form with Ajax in WicketTester
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-254
>                 URL: https://issues.apache.org/jira/browse/WICKET-254
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 1.3.0-beta2
>         Environment: Ubuntu Dapper Linux, Sun java 1.5.0_10
>            Reporter: Timo Rantalaiho
>            Assignee: Jean-Baptiste Quenot
>            Priority: Minor
>             Fix For: 1.3.0-beta2
>
>         Attachments: ajax-validation-sans-submit-1.3.0.zip, ajax-validation-sans-submit.zip, wicket-form-submit-enable-toggle.diff
>
>
> I have code to validate {{TextField}}s one by one with ajax. While the code works, I wasn't able to assert it working with WicketTester.
> The attached quickstart can be used to reproduce the problem on a 2.0 snapshot. The code works in a browser (validity gets toggled true / false when changing the input length), but WicketTester fails. 
> With WicketTester, the ajax event gets triggered (and it calls {{validate}} on the field), but {{isValid}} always returns {{true}}.

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