I am building a Panel that is constructed with a PropertyModel.
It will use this PropertyModel to construct a RadioGroup.
(The PropertyModel will determine the initial
selected value, and will store the result somewhere). Another component in the panel should be enabled or not depending
upon the current choice of the RadioGroup, so I need
to override its “boolean isEnabled()”
method. How can that method
retrieve the current RadioGroup selection? I see no method in RadioGroup
to retrieve its current value, and I cannot call “radioPropertyModel.getObject(component)”
because the method is protected.
Nor do I have access from within the panel to the environment in which
the PropertyModel was created. Would I be able to auto-enable/disable the second component if I
use RadioChoice instead of RadioGroup? |