Hello,

Given:
- I'm using Wicket 1.3.6.
- A page containing a form containing an unchecked checkbox is sent to the 
browser.
- The user does not check the box, and submits the form.
- The form fails validation, and the same page is rendered again as the 
response.

I find that suddenly the checkbox becomes checked, if the markup file 
happens to have had it checked.

In CheckBox.onComponentTag(ComponentTag), a call to getValue() returns 
null - I'm guessing because an unchecked checkbox results in no request 
parameter - thus the following code is not reached:

        // In case the attribute was added at design time
        tag.remove("checked");

I can see in the response HTML that Wicket wrote out the checked="checked" 
attribute from the markup file.

Obviously a workaround is not to check the box in the markup, but I think 
this is a bug.

Regards,
Paul

Reply via email to