posted 15 years ago
They're called "radio buttons" because back before electronic presets, automobile radios had a bank of mechanical buttons used to select preset stations. These buttons were designed so that when you pushed one button in, whatever button was previously pushed in would pop out. In other words, you couldn't push multiple buttons - only one selection was allowed at a time.
This is different from a check box. Each check box can stand by itself, and only cares what state other controls are in if you code explict logic to link them.
Visually, the radio button is usually circular and the check box is usually square, but it's the different functionality that really matters. Functionally, one check box can do the work of 2 radio buttons, since a properly functioning radio button bank has exactly one and only one button switched on at any time - and should never have them all switched off unless the bank is completely disabled. Radio buttons are more appropriate when there are more than 2 possible states, although some GUIs also have provision for a tri-state checkbox.
Since I don't have a completely accurate picture of what you're attempting to control, I can't give a definitive answer, but it's more common when mixing controls which affect other controls that the affected controls are disabled, not "validated". JSF provides the "disabled="true"" attribute for that purpose.
In order to provide better interactivity, it's common to use JavaScript to do client-side control of things of this nature, although a well-written app will also understand that JavaScript might be disabled and provide server-side support as a backup (and to ensure that no one short-circuits the intent).
Validators don't appear to be appropriate here. What you'd typically do is make the controlling buttons have "immedate="true"" actions and set the disabled properties in the controlling button action processors. For better polish, you could use an AJAX framework like RichFaces so that instead of re-rendering the entire page, only the affected controls are updated on the page display.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer