Hi All
I'm having problems to make a radio component work the way I need.
I have a list of PhoneNumber objects:
class PhoneNumber {
String number;
boolean default;
}
The list can have only one entry set as default value. I'm trying to
make the radio button set the value of default in each
Hi Marco,
I haven't tested this, but I believe this should do the trick:
class PhoneNumber {
String number;
boolean default;
/* Add getters and setters for both */
}
public void EditPhonePanel(String id, PhoneNumber phoneNumber) {
CompoundPropertyModel model = new
Please change my TextField line for
add(TextField(number, model.bind(number)));
Please check parenthesis as well :) I'm not working now and my IDE is not open
Sorry!
On Tue, Aug 9, 2011 at 7:12 PM, Rodrigo Heffner
rodrigo.heff...@gmail.com wrote:
Hi Marco,
I haven't tested this, but I
Hi Rodrigo,
Thanks for the fast response, but that approach didn't solve the
problem. Actually, the problem is not the CompoundPropertyModel, if I
use a PropertyModel instead it wouldn't work as well... in both cases
only the textField is updating my model, the radio does not.
Thanks
Marco
On
Hi Marco,
I'm not sure why this is happening. I would probably add an
AjaxFormComponentUpdatingBehavior to your radio (here is an example
http://wicketstuff.org/wicket13/ajax/choice) and use some debug lines
to check values. Note that your components must be inside a form
(which I believe yours
Hi Rodrigo
Thanks for your help, but that's not the point. The point is, I need a
way to make the radio work the same way textField works, for example.
I have a dynamic list of phones and I want the auto bind of
propertyModel automatically set the boolean property of my object to
true or false