Package org.apache.empire.jsf2.controls
Class TextInputControl
java.lang.Object
org.apache.empire.jsf2.controls.InputControl
org.apache.empire.jsf2.controls.TextInputControl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNumberInputConverter Formats a decimal value based on the NumberFormatNested 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 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
ConstructorsConstructorDescriptionTextInputControl(String name) TextInputControl(String name, Class<? extends javax.faces.component.html.HtmlInputText> inputComponentClass) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateInputComponents(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, List<javax.faces.component.UIComponent> compList) protected javax.faces.component.UIComponentcreateUnitLabel(String tagStyle, InputControl.InputInfo ii, String value) 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 DateFormatgetDateFormat(DataType dataType, InputControl.ValueInfo vi, Column column) protected intprotected NumberFormatgetNumberFormat(DataType dataType, InputControl.ValueInfo vi, Column column) protected Stringprotected DataTypegetValueType(Object value, DataType desiredType) protected ObjectparseDate(String s, DateFormat df) protected ObjectparseInputValue(String value, InputControl.InputInfo ii) Parses a value for a single input componentprotected ObjectparseNumber(String value, NumberFormat nf) voidrenderValue(Object value, InputControl.ValueInfo vi, javax.faces.context.ResponseWriter writer) Renders the control value without a surrounding tag (Text only)protected voidsetInputStyleClass(javax.faces.component.UIInput input, StyleClass styleClass) protected voidsetInputValueExpression(javax.faces.component.UIInput input, javax.el.ValueExpression value, 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, restoreSubmittedValue, setInputStyleClass, setInputStyleClass, setInputValue, setInputValue, updateAttachedObjects, updateInputState
-
Field Details
-
NAME
- See Also:
-
FORMAT_UNIT
- See Also:
-
FORMAT_UNIT_ATTRIBUTE
- See Also:
-
DATE_FORMAT
- See Also:
-
DATE_FORMAT_ATTRIBUTE
- See Also:
-
FRACTION_DIGITS
- See Also:
-
-
Constructor Details
-
TextInputControl
-
TextInputControl
-
TextInputControl
public TextInputControl()
-
-
Method Details
-
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
-
createUnitLabel
protected javax.faces.component.UIComponent createUnitLabel(String tagStyle, InputControl.InputInfo ii, String value) -
setInputStyleClass
- Overrides:
setInputStyleClassin classInputControl
-
setInputValueExpression
protected void setInputValueExpression(javax.faces.component.UIInput input, javax.el.ValueExpression value, InputControl.InputInfo ii) - Overrides:
setInputValueExpressionin classInputControl
-
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
-
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
-
renderValue
public void renderValue(Object value, InputControl.ValueInfo vi, javax.faces.context.ResponseWriter writer) throws IOException Description copied from class:InputControlRenders the control value without a surrounding tag (Text only)- Overrides:
renderValuein classInputControl- Parameters:
value- the value to rendervi- the value infowriter- the output writer- Throws:
IOException- from ResponseWriter
-
getMaxInputLength
-
getValueType
-
getNumberFormat
-
getDateFormat
-
getUnitString
-
parseNumber
-
parseDate
-