component as a list of
menu options.
Method Summary |
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.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,
java.util.Iterator<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)
|
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, isBehaviorSource, rendererParamsNotNull, shouldDecode, shouldEncode, shouldEncodeChildren, shouldWriteIdAttribute, writeIdAttributeIfNecessary |
Methods inherited from class javax.faces.render.Renderer |
encodeChildren |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MenuRenderer
public MenuRenderer()
convertSelectManyValue
public java.lang.Object convertSelectManyValue(javax.faces.context.FacesContext context,
javax.faces.component.UISelectMany uiSelectMany,
java.lang.String[] newValues)
throws javax.faces.convert.ConverterException
- Throws:
javax.faces.convert.ConverterException
convertSelectOneValue
public java.lang.Object convertSelectOneValue(javax.faces.context.FacesContext context,
javax.faces.component.UISelectOne uiSelectOne,
java.lang.String newValue)
throws javax.faces.convert.ConverterException
- Throws:
javax.faces.convert.ConverterException
decode
public void decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
- Overrides:
decode
in class HtmlBasicRenderer
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Overrides:
encodeBegin
in class javax.faces.render.Renderer
- Throws:
java.io.IOException
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Overrides:
encodeEnd
in class HtmlBasicRenderer
- Throws:
java.io.IOException
getConvertedValue
public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object submittedValue)
throws javax.faces.convert.ConverterException
- Overrides:
getConvertedValue
in class HtmlBasicInputRenderer
- Throws:
javax.faces.convert.ConverterException
convertSelectManyValuesForModel
protected java.lang.Object convertSelectManyValuesForModel(javax.faces.context.FacesContext context,
javax.faces.component.UISelectMany uiSelectMany,
java.lang.Class modelType,
java.lang.String[] newValues)
convertSelectManyValues
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
- Throws:
javax.faces.convert.ConverterException
renderOption
protected boolean renderOption(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
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
- Throws:
java.io.IOException
writeDefaultSize
protected void writeDefaultSize(javax.faces.context.ResponseWriter writer,
int itemCount)
throws java.io.IOException
- Throws:
java.io.IOException
containsaValue
protected boolean containsaValue(java.lang.Object valueArray)
getCurrentSelectedValues
protected java.lang.Object getCurrentSelectedValues(javax.faces.component.UIComponent component)
getMultipleText
protected java.lang.String getMultipleText(javax.faces.component.UIComponent component)
getSubmittedSelectedValues
protected java.lang.Object[] getSubmittedSelectedValues(javax.faces.component.UIComponent component)
isSelected
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)
renderOptions
protected int renderOptions(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Iterator<javax.faces.model.SelectItem> items)
throws java.io.IOException
- Throws:
java.io.IOException
renderSelect
protected void renderSelect(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws java.io.IOException
- Throws:
java.io.IOException
coerceToModelType
protected java.lang.Object coerceToModelType(javax.faces.context.FacesContext ctx,
java.lang.Object value,
java.lang.Class itemValueType)
createCollection
protected java.util.Collection createCollection(java.util.Collection collection,
java.lang.Class<? extends java.util.Collection> fallBackType)
- Parameters:
collection
- a Collection instance
- Returns:
- a new
Collection
instance or null if the instance
cannot be created
cloneValue
protected java.util.Collection cloneValue(java.lang.Object value)
Utility method to invoke the the clone
method on the provided
value.
- Parameters:
value
- the value to clone
- Returns:
- the result of invoking
clone()
or null
if the value could not be cloned or does not implement the
Cloneable
interface
bestGuess
protected java.util.Collection bestGuess(java.lang.Class<? extends java.util.Collection> type,
int initialSize)
- Parameters:
type
- the target model typeinitialSize
- the initial size of the Collection
- Returns:
- a
Collection
instance that best matches
type
createCollectionFromHint
protected java.util.Collection createCollectionFromHint(java.lang.Object collectionTypeHint)
Create a collection from the provided hint.
- Parameters:
collectionTypeHint
- the Collection type as either a String or Class
- Returns:
- a new Collection instance
isHideNoSelection
protected boolean isHideNoSelection(javax.faces.component.UIComponent component)
Copyright © 2011 Oracle America, Inc. All Rights Reserved.