Title | Form Input Plugin Does Not Allow Checked Radio Or Checkboxes |
Date | 07-Jul-2005 17:08:11 EEST |
Version | ALL |
Submitter | JohnVolkar |
Bug criticality | LightBug |
Browser version | ANY |
Bug status | ClosedBug |
PageProvider used | ANY |
Servlet Container | ANY |
Operating System | ANY |
URL | WikiFormsExample |
Java version | ANY |
Mentioned on WikiFormsExample, on idle whim I looked at FormInput.java, a possible fix is to add the field.setChecked(...) bit near line 77.
// In order to isolate posted form elements into their own // map, prefix the variable name here. It will be stripped // when the handler plugin is executed. Input field = new Input( inputType, HANDLERPARAM_PREFIX + inputName, inputValue ); field.setChecked( params.containsKey( "checked" ) );
Hmm, I wonder if a more general approach via some addAttribute(..) bit of voo-doo; there are lots of stuff that we could allow to be set that we're not.
--JohnV
Fixed in 2.2.29. You can now add 'checked=true' to the arguments.
Add new attachment
Only authorized users are allowed to upload new attachments.