Class RadioChoiceCallback
java.lang.Object
javax.security.auth.callback.ChoiceCallback
org.forgerock.openam.authentication.callbacks.RadioChoiceCallback
- All Implemented Interfaces:
Serializable,Callback
A marker subclass of
ChoiceCallback that signals to UIs that the choices should be rendered
as radio buttons.
The on-the-wire JSON type remains "ChoiceCallback" for backwards compatibility.
An additional output field {"name":"radio","value":true} is included in the response so that
UIs that understand it can branch to radio-button rendering, while older UIs fall back to their
existing ChoiceCallback rendering without error.
Radio buttons are inherently single-select; multiple selections are not supported by this callback.
Use this callback type via:
ChoiceCollectorNodewhen itsradioconfig attribute istrue.callbacks.radioChoiceCallback(...)inside a ScriptedDecisionNode script.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRadioChoiceCallback(String prompt, String[] choices, int defaultChoice) Constructs aRadioChoiceCallbackwith a prompt, a list of choices, and a default choice. -
Method Summary
Methods inherited from class javax.security.auth.callback.ChoiceCallback
allowMultipleSelections, getChoices, getDefaultChoice, getPrompt, getSelectedIndexes, setSelectedIndex, setSelectedIndexes
-
Constructor Details
-
RadioChoiceCallback
Constructs aRadioChoiceCallbackwith a prompt, a list of choices, and a default choice.- Parameters:
prompt- the prompt used to describe the list of choices.choices- the list of choices.defaultChoice- the index of the default choice.- Throws:
IllegalArgumentException- if prompt is null/empty, choices is null/empty, any choice is null/empty, or defaultChoice is out of range.
-