public class MenuRenderer extends HtmlBasicInputRenderer
UISelectOne or UISelectMany component as a list of
menu options.
HtmlBasicRenderer.OptionComponentInfo, HtmlBasicRenderer.Param
Modifier and Type | Field and Description |
---|---|
private static Attribute[] |
ATTRIBUTES |
EMPTY_PARAMS, logger
Constructor and Description |
---|
MenuRenderer() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection |
bestGuess(java.lang.Class<? extends java.util.Collection> type,
int initialSize) |
protected java.util.Collection |
cloneValue(java.lang.Object value)
Utility method to invoke the the
clone method on the provided
value. |
protected java.lang.Object |
coerceToModelType(javax.faces.context.FacesContext ctx,
java.lang.Object value,
java.lang.Class itemValueType) |
protected boolean |
containsaValue(java.lang.Object valueArray) |
java.lang.Object |
convertSelectManyValue(javax.faces.context.FacesContext context,
javax.faces.component.UISelectMany uiSelectMany,
java.lang.String[] newValues) |
protected java.lang.Object |
convertSelectManyValues(javax.faces.context.FacesContext context,
javax.faces.component.UISelectMany uiSelectMany,
java.lang.Class arrayClass,
java.lang.String[] newValues) |
protected java.lang.Object |
convertSelectManyValuesForModel(javax.faces.context.FacesContext context,
javax.faces.component.UISelectMany uiSelectMany,
java.lang.Class modelType,
java.lang.String[] newValues) |
java.lang.Object |
convertSelectOneValue(javax.faces.context.FacesContext context,
javax.faces.component.UISelectOne uiSelectOne,
java.lang.String newValue) |
protected java.util.Collection |
createCollection(java.util.Collection collection,
java.lang.Class<? extends java.util.Collection> fallBackType) |
protected java.util.Collection |
createCollectionFromHint(java.lang.Object collectionTypeHint)
Create a collection from the provided hint.
|
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
java.lang.Object |
getConvertedValue(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object submittedValue) |
protected java.lang.Object |
getCurrentSelectedValues(javax.faces.component.UIComponent component) |
protected java.lang.String |
getMultipleText(javax.faces.component.UIComponent component) |
protected java.lang.Object[] |
getSubmittedSelectedValues(javax.faces.component.UIComponent component) |
protected boolean |
isHideNoSelection(javax.faces.component.UIComponent component) |
protected boolean |
isSelected(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object itemValue,
java.lang.Object valueArray,
javax.faces.convert.Converter converter) |
protected boolean |
renderOption(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.component.UIComponent selectComponent,
javax.faces.convert.Converter converter,
javax.faces.model.SelectItem curItem,
java.lang.Object currentSelections,
java.lang.Object[] submittedValues,
HtmlBasicRenderer.OptionComponentInfo optionInfo) |
protected int |
renderOptions(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
SelectItemsIterator<javax.faces.model.SelectItem> items) |
protected void |
renderSelect(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
protected void |
writeDefaultSize(javax.faces.context.ResponseWriter writer,
int itemCount) |
getNonOnChangeBehaviors, getNonOnClickSelectBehaviors, getValue, setSubmittedValue
augmentIdReference, convertClientId, decodeBehaviors, encodeRecursive, getBehaviorParameters, getChildren, getCurrentValue, getEndTextToRender, getFacet, getForComponent, getFormattedValue, getFormattedValue, getMessageIter, getParamList, getPassThruBehaviors, getRendersChildren, isBehaviorSource, rendererParamsNotNull, shouldDecode, shouldEncode, shouldEncodeChildren, shouldWriteIdAttribute, writeIdAttributeIfNecessary
private static final Attribute[] ATTRIBUTES
public java.lang.Object convertSelectManyValue(javax.faces.context.FacesContext context, javax.faces.component.UISelectMany uiSelectMany, java.lang.String[] newValues) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterException
public java.lang.Object convertSelectOneValue(javax.faces.context.FacesContext context, javax.faces.component.UISelectOne uiSelectOne, java.lang.String newValue) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterException
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
in class HtmlBasicRenderer
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeBegin
in class javax.faces.render.Renderer
java.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeEnd
in class HtmlBasicRenderer
java.io.IOException
public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object submittedValue) throws javax.faces.convert.ConverterException
getConvertedValue
in class HtmlBasicInputRenderer
javax.faces.convert.ConverterException
protected java.lang.Object convertSelectManyValuesForModel(javax.faces.context.FacesContext context, javax.faces.component.UISelectMany uiSelectMany, java.lang.Class modelType, java.lang.String[] newValues)
protected java.lang.Object convertSelectManyValues(javax.faces.context.FacesContext context, javax.faces.component.UISelectMany uiSelectMany, java.lang.Class arrayClass, java.lang.String[] newValues) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterException
protected boolean renderOption(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent selectComponent, javax.faces.convert.Converter converter, javax.faces.model.SelectItem curItem, java.lang.Object currentSelections, java.lang.Object[] submittedValues, HtmlBasicRenderer.OptionComponentInfo optionInfo) throws java.io.IOException
java.io.IOException
protected void writeDefaultSize(javax.faces.context.ResponseWriter writer, int itemCount) throws java.io.IOException
java.io.IOException
protected boolean containsaValue(java.lang.Object valueArray)
protected java.lang.Object getCurrentSelectedValues(javax.faces.component.UIComponent component)
protected java.lang.String getMultipleText(javax.faces.component.UIComponent component)
protected java.lang.Object[] getSubmittedSelectedValues(javax.faces.component.UIComponent component)
protected boolean isSelected(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object itemValue, java.lang.Object valueArray, javax.faces.convert.Converter converter)
protected int renderOptions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, SelectItemsIterator<javax.faces.model.SelectItem> items) throws java.io.IOException
java.io.IOException
protected void renderSelect(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
protected java.lang.Object coerceToModelType(javax.faces.context.FacesContext ctx, java.lang.Object value, java.lang.Class itemValueType)
protected java.util.Collection createCollection(java.util.Collection collection, java.lang.Class<? extends java.util.Collection> fallBackType)
collection
- a Collection instanceCollection
instance or null if the instance
cannot be createdprotected java.util.Collection cloneValue(java.lang.Object value)
Utility method to invoke the the clone
method on the provided
value.
value
- the value to cloneclone()
or null
if the value could not be cloned or does not implement the
Cloneable
interfaceprotected java.util.Collection bestGuess(java.lang.Class<? extends java.util.Collection> type, int initialSize)
type
- the target model typeinitialSize
- the initial size of the Collection
Collection
instance that best matches
type
protected java.util.Collection createCollectionFromHint(java.lang.Object collectionTypeHint)
Create a collection from the provided hint.
collectionTypeHint
- the Collection type as either a String or Classprotected boolean isHideNoSelection(javax.faces.component.UIComponent component)
Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.