BACKGROUND:

I have a CheckBoxMultipleChoice where all items are disabled. Also, one of
the items is selected by default.

1. I construct my CheckBoxMultipleChoice as 

checkBoxes = new CheckBoxMultipleChoice("CheckboxGroup", new ArrayList()) ;

2. I present the choices (all disabled) as

checkBoxes.setChoices(myList);  // myList is a separate ArrayList of strings
checkBoxes.setEnabled(false);

3. and finally, I pre-select one of the items as follows

ArrayList initialList = new ArrayList();
initialList.add("Item4");  // pre-selecting Checkbox4
checkBoxes.setModelObject(initialList);

PROBLEM:

When I come to Form.onSubmit(), both getInput and getValue return NULL, but
they shouldn't. I should have the value of the single checkbox that is
pre-selected. However, since the user can't do anything (the field is
disabled), there is no input.

How can I correctly get the one pre-selected value in this disabled
CheckBoxMultipleChoice?

Something seems to be out of sync between the back-end and the front-end.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CheckBoxMultipleChoice-s-getInput-and-getValue-return-NULL-tp3442135p3442135.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to