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

Igor Vaynberg resolved WICKET-1260.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.1
         Assignee: Igor Vaynberg

> CheckBox.setRequired() is not picked up in 1.3-final
> ----------------------------------------------------
>
>                 Key: WICKET-1260
>                 URL: https://issues.apache.org/jira/browse/WICKET-1260
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-final
>            Reporter: Edvin Syse
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.1
>
>
> I found that when upgrading from 1.3-rc2 to 1.3-final, the setRequired() on a 
> CheckBox I had was no longer registered as a field-error when posting the 
> form with no value in the checkbox.
> Steps to reproduce:
> Create a quickstrart project and put the following in the HomePage.java:
> public class HomePage extends WebPage {
>     public HomePage(final PageParameters parameters) {
>       add(new FeedbackPanel("feedback"));
>       
>       Form f = new Form("f");
>       add(f);
>       
>       CheckBox agree = new CheckBox("agree", new Model());
>       agree.setRequired(true);
>       f.add(agree);
>       
>       Button submit = new Button("submit");
>       f.add(submit);
>     }
> }
> Then HomePage.html:
> <html xmlns:wicket="http://wicket.apache.org";>
>     <body>
>       <div wicket:id="feedback">Feedback</div>
>       
>         <form wicket:id="f">
>                       <label>Agree</label>
>                       <input type="checkbox" wicket:id="agree" />
>                       
>                       <input type="submit" wicket:id="submit" />              
>         </form>
>     </body>
> </html>
> With 1.3-final I don't get a feedback/error message. With 1.3-rc2, the 
> feedback message "Field 'agree' is required." shows up when I post the form.

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

Reply via email to