public abstract class InputControl extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
InputControl.InputInfo
This interface extends the value information by information about the input control
used with the renderInput function
|
static interface |
InputControl.ValueInfo
This interface allows access to a value and its metainformation
used with the renderData function
|
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_NULL |
static String |
FORMAT_NULL_ATTRIBUTE |
static String |
HTML_ATTR_CHECKED |
static String |
HTML_ATTR_CLASS |
static String |
HTML_ATTR_DISABLED |
static String |
HTML_ATTR_ID |
static String |
HTML_ATTR_STYLE |
static String |
HTML_ATTR_TYPE |
static String |
HTML_EXPR_NBSP |
static String |
HTML_TAG_DIV |
static String |
HTML_TAG_INPUT |
static String |
HTML_TAG_LABEL |
static String |
HTML_TAG_SPAN |
static String |
HTML_TAG_TABLE |
static String |
HTML_TAG_TD |
static String |
HTML_TAG_TR |
Modifier | Constructor and Description |
---|---|
|
InputControl() |
protected |
InputControl(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAttachedObjects(javax.faces.component.UIComponent parent,
javax.faces.context.FacesContext context,
InputControl.InputInfo ii,
javax.faces.component.UIComponentBase inputComponent) |
void |
addRemoveDisabledStyle(javax.faces.component.UIInput input,
boolean disabled) |
void |
addRemoveInvalidStyle(javax.faces.component.UIInput input,
boolean invalid) |
void |
addRemoveStyle(javax.faces.component.UIInput input,
String styleName,
boolean setStyle) |
protected void |
clearSubmittedValue(javax.faces.component.UIInput input) |
protected void |
copyAttribute(InputControl.InputInfo ii,
javax.faces.component.UIInput input,
String name) |
protected void |
copyAttributes(javax.faces.component.UIComponent parent,
InputControl.InputInfo ii,
javax.faces.component.UIInput input) |
protected void |
copyAttributes(javax.faces.component.UIComponent parent,
InputControl.InputInfo ii,
javax.faces.component.UIInput input,
String additonalStyle) |
void |
createInput(javax.faces.component.UIComponent comp,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context) |
protected abstract void |
createInputComponents(javax.faces.component.UIComponent parent,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context,
List<javax.faces.component.UIComponent> compList) |
protected String |
escapeHTML(String text)
escapes a String for html
|
protected Object |
formatInputValue(Object value,
InputControl.InputInfo ii)
Override this to format a value for output
|
protected String |
formatValue(InputControl.ValueInfo vi)
Returns the value formated as a string
This is a shortcut for formatString(vi.getValue(), vi)
Derived classes may override formatString
|
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
|
Object |
getConvertedValue(javax.faces.component.UIComponent comp,
InputControl.InputInfo ii,
Object submittedValue) |
protected javax.faces.component.UIInput |
getFirstInput(List<javax.faces.component.UIComponent> compList) |
protected int |
getFormatInteger(InputControl.ValueInfo vi,
String option,
String columnAttributeName) |
protected String |
getFormatOption(InputControl.ValueInfo vi,
String option) |
protected Object |
getFormatOption(InputControl.ValueInfo vi,
String option,
String columnAttributeName) |
protected String |
getFormatString(InputControl.ValueInfo vi,
String option,
String columnAttributeName) |
protected javax.faces.component.UIInput |
getInputComponent(javax.faces.component.UIComponent parent) |
Object |
getInputValue(javax.faces.component.UIComponent comp,
InputControl.InputInfo ii,
boolean submitted) |
String |
getLabelForId(InputControl.InputInfo ii) |
String |
getName() |
protected boolean |
hasFormatOption(InputControl.ValueInfo vi,
String option)
checks if a particular formating option has been specified.
|
boolean |
isCreatingComponents() |
protected Object |
parseInputValue(String value,
InputControl.InputInfo ii) |
void |
postUpdateModel(javax.faces.component.UIComponent comp,
InputControl.InputInfo ii,
javax.faces.context.FacesContext fc) |
void |
renderInput(javax.faces.component.UIComponent comp,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context) |
void |
renderValue(InputControl.ValueInfo vi,
javax.faces.context.ResponseWriter writer) |
protected void |
setInputValue(javax.faces.component.UIInput input,
InputControl.InputInfo ii) |
protected void |
updateAttachedObjects(javax.faces.component.UIComponent parent,
javax.faces.context.FacesContext context,
InputControl.InputInfo ii,
javax.faces.component.UIComponentBase inputComponent) |
protected abstract void |
updateInputState(List<javax.faces.component.UIComponent> compList,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context,
boolean setValue) |
void |
updateInputState(javax.faces.component.UIComponent parent,
InputControl.InputInfo ii,
javax.faces.context.FacesContext context,
boolean setValue) |
public static final String FORMAT_NULL
public static final String FORMAT_NULL_ATTRIBUTE
public static final String HTML_TAG_DIV
public static final String HTML_TAG_SPAN
public static final String HTML_TAG_TABLE
public static final String HTML_TAG_TR
public static final String HTML_TAG_TD
public static final String HTML_TAG_INPUT
public static final String HTML_TAG_LABEL
public static final String HTML_ATTR_ID
public static final String HTML_ATTR_CLASS
public static final String HTML_ATTR_STYLE
public static final String HTML_ATTR_TYPE
public static final String HTML_ATTR_DISABLED
public static final String HTML_ATTR_CHECKED
public static String HTML_EXPR_NBSP
public InputControl()
protected InputControl(String name)
public final String getName()
public String getLabelForId(InputControl.InputInfo ii)
public boolean isCreatingComponents()
public void createInput(javax.faces.component.UIComponent comp, InputControl.InputInfo ii, javax.faces.context.FacesContext context)
public void renderValue(InputControl.ValueInfo vi, javax.faces.context.ResponseWriter writer) throws IOException
IOException
public void renderInput(javax.faces.component.UIComponent comp, InputControl.InputInfo ii, javax.faces.context.FacesContext context) throws IOException
IOException
public void updateInputState(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, boolean setValue)
public void postUpdateModel(javax.faces.component.UIComponent comp, InputControl.InputInfo ii, javax.faces.context.FacesContext fc)
public Object getInputValue(javax.faces.component.UIComponent comp, InputControl.InputInfo ii, boolean submitted)
public Object getConvertedValue(javax.faces.component.UIComponent comp, InputControl.InputInfo ii, Object submittedValue)
protected void addAttachedObjects(javax.faces.component.UIComponent parent, javax.faces.context.FacesContext context, InputControl.InputInfo ii, javax.faces.component.UIComponentBase inputComponent)
protected void updateAttachedObjects(javax.faces.component.UIComponent parent, javax.faces.context.FacesContext context, InputControl.InputInfo ii, javax.faces.component.UIComponentBase inputComponent)
protected javax.faces.component.UIInput getFirstInput(List<javax.faces.component.UIComponent> compList)
protected void setInputValue(javax.faces.component.UIInput input, InputControl.InputInfo ii)
protected void clearSubmittedValue(javax.faces.component.UIInput input)
protected Object formatInputValue(Object value, InputControl.InputInfo ii)
value
- ii
- protected Object parseInputValue(String value, InputControl.InputInfo ii)
protected abstract void createInputComponents(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.context.FacesContext context, List<javax.faces.component.UIComponent> compList)
protected abstract void updateInputState(List<javax.faces.component.UIComponent> compList, InputControl.InputInfo ii, javax.faces.context.FacesContext context, boolean setValue)
protected javax.faces.component.UIInput getInputComponent(javax.faces.component.UIComponent parent)
protected void copyAttributes(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.component.UIInput input, String additonalStyle)
protected final void copyAttributes(javax.faces.component.UIComponent parent, InputControl.InputInfo ii, javax.faces.component.UIInput input)
protected void copyAttribute(InputControl.InputInfo ii, javax.faces.component.UIInput input, String name)
public void addRemoveDisabledStyle(javax.faces.component.UIInput input, boolean disabled)
public void addRemoveInvalidStyle(javax.faces.component.UIInput input, boolean invalid)
public void addRemoveStyle(javax.faces.component.UIInput input, String styleName, boolean setStyle)
protected String formatValue(Object value, InputControl.ValueInfo vi)
value
- the value to be formattedvi
- Meta-information about the valueprotected final String formatValue(InputControl.ValueInfo vi)
protected String escapeHTML(String text)
text
- protected boolean hasFormatOption(InputControl.ValueInfo vi, String option)
vi
- the value infooption
- the formating option to checkprotected String getFormatOption(InputControl.ValueInfo vi, String option)
protected Object getFormatOption(InputControl.ValueInfo vi, String option, String columnAttributeName)
protected String getFormatString(InputControl.ValueInfo vi, String option, String columnAttributeName)
protected int getFormatInteger(InputControl.ValueInfo vi, String option, String columnAttributeName)
Copyright © 2008–2017 Apache Software Foundation. All rights reserved.