Re: Disabling Individual Checkboxes in CheckGroup

2013-05-01 Thread Paul Bors
See the examples for form input and the use of CheckGroup: http://www.wicket-library.com/wicket-examples/forminput If you want to uncheck or check one of your component, either insert or remove from your collection the element you want checked or not. ~ Thank you, Paul Bors PS: If by now you

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread eugenebalt
Thanks Sven, let me clarify something in your code: 1) #newItem only has the signature newItem(int); there is no newItem(int,IModel). 2) At the line super.configure() we get the error The method configure() is undefined for the type Check. 3) When you make references to enabled, I assume it's

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread Paul Bors
There is the Wicket way of doing thing simple, and then there our own way of overriding the default behavior of the framework for whatever needs you might have. In your case, I think you're overcomplicating things by way too much and you got yourself in a situation where it involved more work to

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread Sven Meier
Hi, I didn't check the code with a compiler so please excuse any errors. 1) see ListView#newItem(int, IModel) 2) see Component#onConfigure() 3) enabled could be a member variable of the containing panel Regards Sven On 04/29/2013 04:47 PM, eugenebalt wrote: Thanks Sven, let me clarify

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread eugenebalt
Thanks Sven. We don't have the below methods. We are using Wicket 1.4.7, probably time to upgrade. ListView#newItem(int, IModel) see Component#onConfigure() -- View this message in context:

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread Sven Meier
1.4.7 ... that's really old :/. Sven On 04/29/2013 09:13 PM, eugenebalt wrote: Thanks Sven. We don't have the below methods. We are using Wicket 1.4.7, probably time to upgrade. ListView#newItem(int, IModel) see Component#onConfigure() -- View this message in context:

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread Igor Vaynberg
On Fri, Apr 26, 2013 at 8:39 AM, eugenebalt eugeneb...@yahoo.com wrote: Igor, The problem is, you do check.setEnabled(false) in *ListView.populateItem()* for a CheckGroup control. so? This method executes AFTER the Ajax update. It's too late to do check.setEnable(false) on the render of

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Paul: The Check is constructed *inside populateItem()*. This is already too late, my output shows this happens after the Ajax ecent. There is no way to construct a Check outside the populateItem, as far as I know. This is how Checks are used: CheckGroup cg = new CheckGroup(apps); add(cg);

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Here is the full code. This is an urgent problem so any advice much appreciated. ISSUE: Cannot enable/disable Checks in an Ajax update, their state remains the same. The Checks in the CheckGroup are supposed to change depending on a DropDown change. 1) On Page Construction, all Checks in the

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread Sven Meier
Hi, 1) None of the checkboxes changes state after the Ajax update (but the Ajax request is processed) You're calling #setRenderBodyOnly(false) too late. By default CheckGroup does not render its tag, so you have to enable it for Ajax updates *before* it is rendered: final CheckGroup

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-26 Thread eugenebalt
Igor, The problem is, you do check.setEnabled(false) in *ListView.populateItem()* for a CheckGroup control. This method executes AFTER the Ajax update. It's too late to do check.setEnable(false) on the render of the CheckGroup's ListView. We need to disable/enable checkboxes in a CheckGroup as

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-26 Thread Paul Bors
You can always override the getter method when you construct the Checks and toggle the boolean value via Ajax. ~ Thank you, Paul Bors On Fri, Apr 26, 2013 at 11:39 AM, eugenebalt eugeneb...@yahoo.com wrote: Igor, The problem is, you do check.setEnabled(false) in *ListView.populateItem()*

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-22 Thread Bertrand Guay-Paquet
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

Re: Disabling Individual Checkboxes in CheckGroup

2013-04-22 Thread Igor Vaynberg
check.setEnabled(false) -igor On Mon, Apr 22, 2013 at 2:09 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: 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