Class RadioButtonGroup

All Implemented Interfaces:
GuiComponent, com.ptc.netmarkets.util.misc.NmFormatable, Serializable

public class RadioButtonGroup extends AttributeInputComponent
A simple GUI component that represents a HTML RadioButton group.

Supported API: true

Extendable: false

Example :

RadioButtonGroup rg = new RadioButtonGroup();
RadioButton r1 = new RadioButton();
RadioButton r2 = new RadioButton();

r1.setLabel("radio1");
r1.setRenderLabel(true);
r1.setValue("r1val");
r1.setId("r1");

r2.setLabel("radio2");
r2.setRenderLabel(true);
r2.setValue("r2val");
r2.setId("r2");
r2.setChecked(true);

rg.addButton(r1);
rg.addButton(r2);

See Also:
  • Method Details

    • addButton

      public void addButton(RadioButton radio)
      The radio buttons added to this RadioButtonGroup. Radio button optionally may have same column name (columnName) and such buttons can also be added to this RadioButtonGroup.

      Supported API: true
      Parameters:
      radio -
    • getButtons

      public List getButtons()
      Get the List of radio buttons for this RadioButtonGroup.

      Supported API: true
      Returns:
      The radio buttons.
    • setSelected

      public void setSelected(String value)
      Sets radio button checked or unchecked based on value or label.

      Supported API: true
      Parameters:
      value -
    • setEditable

      public void setEditable(boolean editable)
      Sets the editable property true or false for RadioButtonGroup. Default is true. The editable property gets propagated to all contained raido buttons as well.

      Supported API: true
      Overrides:
      setEditable in class AttributeInputComponent
      Parameters:
      editable -
    • setLocale

      public void setLocale(Locale locale)
      Set the given locale.

      Supported API: true
      Overrides:
      setLocale in class AbstractGuiComponent
      Parameters:
      locale -
    • setRequired

      public void setRequired(boolean required)
      Sets the required property true or false for RadioButtonGroup. Default is false. The required property gets propagated to all contained raido buttons as well. If the given value is true, the radio button marked as required.

      Supported API: true
      Overrides:
      setRequired in class AbstractGuiComponent
      Parameters:
      required -