public class TextInputControl extends InputControl
Modifier and Type | Class and Description |
---|---|
static class |
TextInputControl.NumberInputConverter
NumberInputConverter
Formats a decimal value based on the NumberFormat
|
InputControl.DisabledType, InputControl.InputInfo, InputControl.ValueInfo
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT |
static String |
DATE_FORMAT_ATTRIBUTE |
static String |
FORMAT_UNIT |
static String |
FORMAT_UNIT_ATTRIBUTE |
static String |
FRACTION_DIGITS |
static String |
NAME |
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 and Description |
---|
TextInputControl() |
TextInputControl(String name) |
TextInputControl(String name,
Class<? extends javax.faces.component.html.HtmlInputText> inputComponentClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
createInputComponents(javax.faces.component.UIComponent parent,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context,
List<javax.faces.component.UIComponent> compList) |
protected javax.faces.component.UIComponent |
createUnitLabel(String tagStyle,
InputControl.InputInfo ii,
String value) |
protected Object |
formatInputValue(Object value,
InputControl.InputInfo ii) |
protected String |
formatValue(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 details
|
protected DateFormat |
getDateFormat(DataType dataType,
InputControl.ValueInfo vi,
Column column) |
protected int |
getMaxInputLength(InputControl.InputInfo ii) |
protected NumberFormat |
getNumberFormat(DataType dataType,
InputControl.ValueInfo vi,
Column column) |
protected String |
getUnitString(InputControl.ValueInfo vi) |
protected DataType |
getValueType(Object value,
DataType desiredType) |
protected Object |
parseDate(String s,
DateFormat df) |
protected Object |
parseInputValue(String value,
InputControl.InputInfo ii) |
protected Object |
parseNumber(String value,
NumberFormat nf) |
void |
renderValue(Object value,
InputControl.ValueInfo vi,
javax.faces.context.ResponseWriter writer)
Renders the control value without a surrounding tag (Text only)
|
protected void |
setInputStyleClass(javax.faces.component.UIInput input,
String cssStyleClass) |
protected void |
setInputValueExpression(javax.faces.component.UIInput input,
javax.el.ValueExpression value,
InputControl.InputInfo ii) |
protected void |
updateInputState(List<javax.faces.component.UIComponent> compList,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phaseId) |
addAttachedObjects, addDataValueStyle, addRemoveDisabledStyle, addRemoveInvalidStyle, addRemoveStyle, addRemoveStyle, addRemoveValueNullStyle, clearLocalValues, clearSubmittedValue, copyAttribute, copyAttributes, copyAttributes, createInput, formatValue, getConvertedValue, getCssStyleClass, getFirstInput, getFormatInteger, getFormatOption, getFormatOption, getFormatString, getInputComponent, getInputStyleClass, getInputValue, getLabelForId, getName, getOptionText, hasFormatOption, hasFormatOption, initCssStyleClass, isCreatingComponents, isInputValueExpressionEnabled, postUpdateModel, renderInput, renderValue, setInputValue, updateAttachedObjects, updateInputState
public static final String NAME
public static final String FORMAT_UNIT
public static final String FORMAT_UNIT_ATTRIBUTE
public static final String DATE_FORMAT
public static final String DATE_FORMAT_ATTRIBUTE
public static final String FRACTION_DIGITS
public TextInputControl(String name, Class<? extends javax.faces.component.html.HtmlInputText> inputComponentClass)
public TextInputControl(String name)
public TextInputControl()
protected void createInputComponents(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, List<javax.faces.component.UIComponent> compList)
createInputComponents
in class InputControl
protected void updateInputState(List<javax.faces.component.UIComponent> compList, InputControl.InputInfo ii, javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
updateInputState
in class InputControl
protected javax.faces.component.UIComponent createUnitLabel(String tagStyle, InputControl.InputInfo ii, String value)
protected void setInputStyleClass(javax.faces.component.UIInput input, String cssStyleClass)
setInputStyleClass
in class InputControl
protected void setInputValueExpression(javax.faces.component.UIInput input, javax.el.ValueExpression value, InputControl.InputInfo ii)
setInputValueExpression
in class InputControl
protected Object parseInputValue(String value, InputControl.InputInfo ii)
parseInputValue
in class InputControl
protected String formatValue(Object value, InputControl.ValueInfo vi)
InputControl
formatValue
in class InputControl
value
- the value to be formattedvi
- Meta-information about the valueprotected Object formatInputValue(Object value, InputControl.InputInfo ii)
formatInputValue
in class InputControl
public void renderValue(Object value, InputControl.ValueInfo vi, javax.faces.context.ResponseWriter writer) throws IOException
InputControl
renderValue
in class InputControl
value
- the value to rendervi
- the value infowriter
- the output writerIOException
- from ResponseWriterprotected int getMaxInputLength(InputControl.InputInfo ii)
protected NumberFormat getNumberFormat(DataType dataType, InputControl.ValueInfo vi, Column column)
protected DateFormat getDateFormat(DataType dataType, InputControl.ValueInfo vi, Column column)
protected String getUnitString(InputControl.ValueInfo vi)
protected Object parseNumber(String value, NumberFormat nf)
protected Object parseDate(String s, DateFormat df)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.