Hi,

I'm not sure this is what you want, but you can subclass the "Check" class and override its onComponentTag method to add disabled="disabled" to the <input> tags you want to disable. You can also do it with a behavior instead of subclassing.

Remember that if you replace the checkbox html <input>s via ajax to toggle the disable state of checkboxes, you will likely lose their current client-side "checked" state. Maybe toggling the "disabled" attribute via javascript using the component ids would be better.

On 22/04/2013 12:06 PM, eugenebalt wrote:
How would you disable individual checkboxes in a CheckGroup?

With a CheckBoxMultipleChoice, it's easy: just override isDisabled(int
index) for the particular index you want to disable.

But we are using a CheckGroup, not CheckBoxMultipleChoice, because we need a
grid layout for our set of checkboxes. The CheckGroup components works via a
repeater, such as ListView. We've tried addOrReplace a new ListView, with
some new disabled checkboxes, and it doesn't pick it up until it goes to
render, which doesn't work for us in an Ajax request.

The new disabled checkboxes in the CheckGroup have to be set as part of the
Ajax update. Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to