public class RadioRenderer extends SelectManyCheckboxListRenderer implements ComponentSystemEventListener
UISelectOne or UISelectMany component as a list of
radio buttons
Modifier and Type | Class and Description |
---|---|
protected static class |
RadioRenderer.Group
Keeps track of all
|
static class |
RadioRenderer.GroupSelectItem
Used when a
|
HtmlBasicRenderer.OptionComponentInfo, HtmlBasicRenderer.Param
EMPTY_PARAMS, logger
PASSTHROUGH_RENDERER_LOCALNAME_KEY
Constructor and Description |
---|
RadioRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
decode(FacesContext context,
UIComponent component)
This override delegates to
#decodeGroup(FacesContext, UISelectOne, String)
when 'group' attribute is set. |
protected void |
decodeGroup(FacesContext context,
UISelectOne radio,
RadioRenderer.Group group)
The difference with default decoding is:
Submitted value is obtained by group name.
|
void |
encodeEnd(FacesContext context,
UIComponent component)
This override delegates to
#encodeEndGroup(FacesContext, UISelectOne, String)
when 'group' attribute is set. |
protected void |
encodeEndGroup(FacesContext context,
UISelectOne radio,
RadioRenderer.Group group)
The difference with default encoding is:
Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent.
|
protected static RadioRenderer.Group |
getGroup(FacesContext context,
UISelectOne radio) |
protected boolean |
isChecked(FacesContext context,
UISelectOne radio,
Object itemValue) |
void |
processEvent(ComponentSystemEvent event)
After adding component to view, if component has group attribute set, then pre-collect the components by group.
|
protected void |
renderInput(FacesContext context,
ResponseWriter writer,
UIComponent component,
String clientId,
Object itemValue,
Converter<?> converter,
boolean checked,
boolean disabled,
RadioRenderer.Group group) |
protected void |
renderLabel(ResponseWriter writer,
UIComponent component,
String forClientId,
SelectItem curItem,
HtmlBasicRenderer.OptionComponentInfo optionInfo) |
protected void |
renderOption(FacesContext context,
UIComponent component,
Converter converter,
SelectItem curItem,
Object currentSelections,
Object[] submittedValues,
boolean alignVertical,
int itemNumber,
HtmlBasicRenderer.OptionComponentInfo optionInfo) |
isBehaviorSource, renderBeginText, renderEndText
bestGuess, cloneValue, coerceToModelType, containsaValue, convertSelectManyValue, convertSelectManyValuesForArray, convertSelectManyValuesForCollection, convertSelectManyValuesForModel, convertSelectOneValue, createCollection, createCollectionFromHint, encodeBegin, getConvertedValue, getCurrentSelectedValues, getMultipleText, getSubmittedSelectedValues, isHideNoSelection, isSelected, renderOption, renderOptions, renderSelect, writeDefaultSize
getNonOnChangeBehaviors, getNonOnClickSelectBehaviors, getValue, setSubmittedValue
augmentIdReference, convertClientId, decodeBehaviors, encodeRecursive, getBehaviorParameters, getChildren, getCurrentValue, getEndTextToRender, getFacet, getForComponent, getFormattedValue, getFormattedValue, getMessageIter, getParamList, getPassThruBehaviors, getRendersChildren, rendererParamsNotNull, shouldDecode, shouldEncode, shouldEncodeChildren, shouldWriteIdAttribute, writeIdAttributeIfNecessary
encodeChildren
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException
processEvent
in interface ComponentSystemEventListener
event
- the ComponentSystemEvent
instance that
is being processed.AbortProcessingException
- if lifecycle processing should
cease for this request.public void decode(FacesContext context, UIComponent component)
#decodeGroup(FacesContext, UISelectOne, String)
when 'group' attribute is set. It will only decode when the current component is the first one of group.decode
in class MenuRenderer
context
- FacesContext
for the request we are processingcomponent
- UIComponent
to be decoded.public void encodeEnd(FacesContext context, UIComponent component) throws IOException
#encodeEndGroup(FacesContext, UISelectOne, String)
when 'group' attribute is set.encodeEnd
in class SelectManyCheckboxListRenderer
context
- FacesContext
for the response we are creatingcomponent
- UIComponent
to be renderedIOException
- if an input/output error occurs while renderingprotected void decodeGroup(FacesContext context, UISelectOne radio, RadioRenderer.Group group)
protected void encodeEndGroup(FacesContext context, UISelectOne radio, RadioRenderer.Group group) throws IOException
IOException
protected boolean isChecked(FacesContext context, UISelectOne radio, Object itemValue)
protected void renderOption(FacesContext context, UIComponent component, Converter converter, SelectItem curItem, Object currentSelections, Object[] submittedValues, boolean alignVertical, int itemNumber, HtmlBasicRenderer.OptionComponentInfo optionInfo) throws IOException
renderOption
in class SelectManyCheckboxListRenderer
IOException
protected void renderInput(FacesContext context, ResponseWriter writer, UIComponent component, String clientId, Object itemValue, Converter<?> converter, boolean checked, boolean disabled, RadioRenderer.Group group) throws IOException
IOException
protected void renderLabel(ResponseWriter writer, UIComponent component, String forClientId, SelectItem curItem, HtmlBasicRenderer.OptionComponentInfo optionInfo) throws IOException
IOException
protected static RadioRenderer.Group getGroup(FacesContext context, UISelectOne radio)
Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.