Package org.apache.empire.jsf2.controls
Class SelectInputControl
java.lang.Object
org.apache.empire.jsf2.controls.InputControl
org.apache.empire.jsf2.controls.SelectInputControl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSelectGroup helper class for building SelectItemGroupsNested classes/interfaces inherited from class org.apache.empire.jsf2.controls.InputControl
InputControl.DisabledType, InputControl.InputInfo, InputControl.ValueInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.empire.jsf2.controls.InputControl
CSS_STYLE_CLASS, FORMAT_NO_VALUE_STYLES, FORMAT_NULL, FORMAT_NULL_ATTRIBUTE, HTML_ATTR_CHECKED, HTML_ATTR_CLASS, HTML_ATTR_DISABLED, HTML_ATTR_ID, HTML_ATTR_STYLE, HTML_ATTR_TYPE, HTML_EXPR_NBSP, HTML_TAG_DIV, HTML_TAG_INPUT, HTML_TAG_LABEL, HTML_TAG_SPAN, HTML_TAG_TABLE, HTML_TAG_TD, HTML_TAG_TR -
Constructor Summary
ConstructorsConstructorDescriptionSelectInputControl(String name, Class<? extends javax.faces.component.html.HtmlSelectOneMenu> menuComponentClass, Class<? extends javax.faces.component.html.HtmlSelectOneListbox> listComponentClass) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelectItem(List<javax.faces.model.SelectItem> list, TextResolver textResolver, OptionEntry e, Class<?> exprType) voidaddSelectItem(List<javax.faces.model.SelectItem> list, TextResolver textResolver, OptionEntry oe, Class<?> exprType, int pos) protected voidcreateInputComponents(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, List<javax.faces.component.UIComponent> compList) javax.faces.component.UISelectOnecreateSelectComponent(javax.faces.component.UIComponent parent, javax.faces.context.FacesContext context, Object formatSize) protected ObjectformatInputValue(Object value, Class<?> targetClass) protected ObjectformatInputValue(Object value, InputControl.InputInfo ii) protected StringformatValue(Object value, InputControl.ValueInfo vi) Returns the value formated as a string this is a simple default implementation that does no type-secific formatting Derived classes may override formatString an provide further formmatting see TextInputControl for detailsprotected Stringprotected List<javax.faces.model.SelectItem>getSelectItemList(javax.faces.component.UISelectOne input) voidinitOptions(javax.faces.component.UISelectOne input, TextResolver textResolver, InputControl.InputInfo ii) protected booleanisEmptyEntryRequired(javax.faces.component.UISelectOne input, Options options, InputControl.InputInfo ii, Object currentValue) protected ObjectparseInputValue(String value, InputControl.InputInfo ii) Parses a value for a single input componentprotected voidsetDisabled(javax.faces.component.UISelectOne input, InputControl.InputInfo ii) protected voidsetItemLabel(javax.faces.model.SelectItem si, TextResolver textResolver, OptionEntry oe) voidsyncOptions(javax.faces.component.UISelectOne input, TextResolver textResolver, InputControl.InputInfo ii) protected voidupdateInputState(List<javax.faces.component.UIComponent> compList, InputControl.InputInfo ii, javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId) Methods inherited from class org.apache.empire.jsf2.controls.InputControl
addAttachedObjects, addDataValueStyle, addRemoveStyle, addRemoveValueNullStyle, clearLocalValues, clearSubmittedValue, copyAttribute, copyAttributes, copyAttributes, createInput, formatValue, getConvertedValue, getCssStyleClass, getFirstInput, getFormatInteger, getFormatOption, getFormatOption, getFormatString, getInputComponents, getInputCount, getInputValue, getInputValue, getLabelForId, getName, getOptionText, hasFormatOption, hasFormatOption, initCssStyleClass, isCreatingComponents, isInputValueExpressionEnabled, parseInputValue, postUpdateModel, renderInput, renderValue, renderValue, restoreSubmittedValue, setInputStyleClass, setInputStyleClass, setInputStyleClass, setInputValue, setInputValue, setInputValueExpression, updateAttachedObjects, updateInputState
-
Field Details
-
COLATTR_ABBR_OPTIONS
- See Also:
-
VALUE_EXPRESSION_TYPE
- See Also:
-
FORMAT_SIZE
- See Also:
-
FORMAT_SIZE_ATTR
- See Also:
-
NAME
- See Also:
-
-
Constructor Details
-
SelectInputControl
-
SelectInputControl
public SelectInputControl()
-
-
Method Details
-
createSelectComponent
public javax.faces.component.UISelectOne createSelectComponent(javax.faces.component.UIComponent parent, javax.faces.context.FacesContext context, Object formatSize) -
createInputComponents
protected void createInputComponents(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, List<javax.faces.component.UIComponent> compList) - Specified by:
createInputComponentsin classInputControl
-
updateInputState
protected void updateInputState(List<javax.faces.component.UIComponent> compList, InputControl.InputInfo ii, javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId) - Specified by:
updateInputStatein classInputControl
-
setDisabled
-
isEmptyEntryRequired
protected boolean isEmptyEntryRequired(javax.faces.component.UISelectOne input, Options options, InputControl.InputInfo ii, Object currentValue) -
initOptions
public void initOptions(javax.faces.component.UISelectOne input, TextResolver textResolver, InputControl.InputInfo ii) -
syncOptions
public void syncOptions(javax.faces.component.UISelectOne input, TextResolver textResolver, InputControl.InputInfo ii) -
getSelectItemList
protected List<javax.faces.model.SelectItem> getSelectItemList(javax.faces.component.UISelectOne input) -
addSelectItem
public void addSelectItem(List<javax.faces.model.SelectItem> list, TextResolver textResolver, OptionEntry oe, Class<?> exprType, int pos) -
addSelectItem
public void addSelectItem(List<javax.faces.model.SelectItem> list, TextResolver textResolver, OptionEntry e, Class<?> exprType) -
setItemLabel
protected void setItemLabel(javax.faces.model.SelectItem si, TextResolver textResolver, OptionEntry oe) -
getNullText
-
formatValue
Description copied from class:InputControlReturns the value formated as a string this is a simple default implementation that does no type-secific formatting Derived classes may override formatString an provide further formmatting see TextInputControl for details- Overrides:
formatValuein classInputControl- Parameters:
value- the value to be formattedvi- Meta-information about the value- Returns:
- the formatted value
-
formatInputValue
- Overrides:
formatInputValuein classInputControl
-
formatInputValue
-
parseInputValue
Description copied from class:InputControlParses a value for a single input component- Overrides:
parseInputValuein classInputControl- Parameters:
value- the value to parseii- the input info- Returns:
- the parsed and converted value
-