Nested Class Summary
Nested Classes
Modifier and Type
Class
Description
protected static class
RadioRenderer.Group
Keeps track of all detail.
static class
RadioRenderer.GroupSelectItem
Used when a doesn't have a select item; it will then get it via first radio of the group.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type
Method
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)
Methods inherited from class com.sun.faces.renderkit.html_basic.MenuRenderer
bestGuess , cloneValue , coerceToModelType , containsaValue , convertSelectManyValue , convertSelectManyValuesForArray , convertSelectManyValuesForCollection , convertSelectManyValuesForModel , convertSelectOneValue , createCollection , createCollectionFromHint , encodeBegin , getConvertedValue , getCurrentSelectedValues , getMultipleText , getSubmittedSelectedValues , isHideNoSelection , isSelected , renderOption , renderOptions , renderSelect , writeDefaultSize
Methods inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
augmentIdReference , convertClientId , decodeBehaviors , encodeRecursive , getBehaviorParameters , getChildren , getCurrentValue , getEndTextToRender , getFacet , getForComponent , getFormattedValue , getFormattedValue , getMessageIter , getParamList , getPassThruBehaviors , getRendersChildren , rendererParamsNotNull , shouldDecode , shouldEncode , shouldEncodeChildren , shouldWriteIdAttribute , writeIdAttributeIfNecessary
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Method Details
After adding component to view, if component has group attribute set, then pre-collect the components by group.
Specified by:
processEvent
in interface ComponentSystemEventListener
Parameters:
event
- the ComponentSystemEvent
instance that is being processed.
Throws:
AbortProcessingException
- if lifecycle processing should cease for this request.
This override delegates to #decodeGroup(FacesContext, UISelectOne, String)
when 'group' attribute is set. It
will only decode when the current component is the first one of group.
Overrides:
decode
in class MenuRenderer
Parameters:
context
- FacesContext
for the request we are processing
component
- UIComponent
to be decoded.
The difference with default decoding is:
Submitted value is obtained by group name.
Submitted value is prefixed with client ID of radio button component, this need to be compared and trimmed.
If any submitted value does not belong to current radio button component, reset its value.
The difference with default encoding is:
Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent.
The 'value' attribute of every radio button is prefixed with client ID of radio button component itself.
No additional (table) markup is being rendered.
Label, if any, is rendered directly after radio button element, without additional markup.
Throws:
IOException