org.apache.empire.jsf2.controls
Class TextInputControl
java.lang.Object
org.apache.empire.jsf2.controls.InputControl
org.apache.empire.jsf2.controls.TextInputControl
public class TextInputControl
- extends InputControl
Method Summary |
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)
Override this to format a value for output |
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(Column col)
|
protected NumberFormat |
getNumberFormat(DataType dataType,
Locale locale,
Column column)
|
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 s,
NumberFormat nf)
|
void |
renderValue(InputControl.ValueInfo vi,
javax.faces.context.ResponseWriter writer)
|
Methods inherited from class org.apache.empire.jsf2.controls.InputControl |
addRemoveDisabledStyle, addRemoveInvalidStyle, addRemoveStyle, clearSubmittedValue, copyAttribute, copyAttributes, copyAttributes, escapeHTML, formatValue, getFormatInteger, getFormatOption, getFormatString, getInputComponent, getInputValue, getLabelForId, getName, hasFormatOption, postUpdateModel, renderInput, setInputValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- See Also:
- Constant Field Values
FORMAT_UNIT
public static final String FORMAT_UNIT
- See Also:
- Constant Field Values
FORMAT_UNIT_ATTRIBUTE
public static final String FORMAT_UNIT_ATTRIBUTE
- See Also:
- Constant Field Values
DATE_FORMAT
public static final String DATE_FORMAT
- See Also:
- Constant Field Values
DATE_FORMAT_ATTRIBUTE
public static final String DATE_FORMAT_ATTRIBUTE
- See Also:
- Constant Field Values
TextInputControl
public TextInputControl(String name,
Class<? extends javax.faces.component.html.HtmlInputText> inputComponentClass)
TextInputControl
public TextInputControl(String name)
TextInputControl
public TextInputControl()
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:
createInputComponents
in class InputControl
createUnitLabel
protected javax.faces.component.UIComponent createUnitLabel(String tagStyle,
InputControl.InputInfo ii,
String value)
parseInputValue
protected Object parseInputValue(String value,
InputControl.InputInfo ii)
- Overrides:
parseInputValue
in class InputControl
formatValue
protected String formatValue(Object value,
InputControl.ValueInfo vi)
- Description copied from class:
InputControl
- 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
- Overrides:
formatValue
in class InputControl
- Parameters:
value
- the value to be formattedvi
- Meta-information about the value
- Returns:
- the formatted value
formatInputValue
protected Object formatInputValue(Object value,
InputControl.InputInfo ii)
- Description copied from class:
InputControl
- Override this to format a value for output
- Overrides:
formatInputValue
in class InputControl
- Returns:
renderValue
public void renderValue(InputControl.ValueInfo vi,
javax.faces.context.ResponseWriter writer)
throws IOException
- Overrides:
renderValue
in class InputControl
- Throws:
IOException
getMaxInputLength
protected int getMaxInputLength(Column col)
getValueType
protected DataType getValueType(Object value,
DataType desiredType)
getNumberFormat
protected NumberFormat getNumberFormat(DataType dataType,
Locale locale,
Column column)
getDateFormat
protected DateFormat getDateFormat(DataType dataType,
InputControl.ValueInfo vi,
Column column)
parseNumber
protected Object parseNumber(String s,
NumberFormat nf)
parseDate
protected Object parseDate(String s,
DateFormat df)
Copyright © 2008–2014 Apache Software Foundation. All rights reserved.