Hi, In new CheckBoxMultipleChoice<JobAdvStates>(id, modelOfCollection, allPossibleChoices) you have to add/remove entries to "modelOfCollection"
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 11, 2016 at 8:29 PM, smoothe19 <[email protected]> wrote: > How can I check or uncheck one checkbox item from a checkboxmultiple choice > > I tried mpCheckBoxes.get(0).setDefaultModel(new Model<>(true)); and also > mpCheckBoxes.get(0).setDefaultObjectModel(new Model<>(true)); both threw an > error > > > > > List<JobAdvStates> mpDECISIONS = new ArrayList<JobAdvStates>(); > > > CheckBoxMultipleChoice<JobAdvStates> mpCheckBoxes = > new CheckBoxMultipleChoice<JobAdvStates>( > "mpToggles", new Model(mpDecisionsSelect), > mpDECISIONS); > > for (JobAdvStates advanceState: advStatesList){ > > if (advanceState.getRecordState().equals("MP") ){ > mpDECISIONS.add(advanceState); > } > > } > > > > fieldEditForm.add(mpCheckBoxes); > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Checking-Dechecking-a-checkbox-multiple-choice-tp4673251.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] > >
