org.loom.tags.core
Class InputTextTag
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
org.loom.tags.AbstractTag
org.loom.tags.AbstractDecoratedTag
org.loom.tags.AbstractHtmlTag
org.loom.tags.AbstractFormFieldTag
org.loom.tags.AbstractFormInputTag
org.loom.tags.core.AbstractTextFieldTag
org.loom.tags.core.InputTextTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag, NumberFieldTag, FormInputTag, HtmlTag, LoomTag
- Direct Known Subclasses:
- InputPasswordTag
@Tag(dynamicAttributes=true,
bodyContent=EMPTY,
example="<l:inputText name=\"mortgage.name\"/>\n<l:inputText name=\"customer.friends[2].name\"/>\n<l:inputText name=\"customer.friendsMap[john].name\"/>")
public class InputTextTag- extends AbstractTextFieldTag
- implements NumberFieldTag
HTML text input field.
Each form field will generate automatically details such as the maxlength and size attributes,
and the corresponding decorator will generate the input field label.
|
Field Summary |
static int |
DEFAULT_MAX_SIZE
default max size when calculating automatically from the maxlength |
|
Method Summary |
void |
doTagImpl()
The method that must be implemented by the child class |
java.lang.Boolean |
getAutocomplete()
|
java.lang.String |
getMax()
|
java.lang.String |
getMin()
|
java.lang.String |
renderAsText()
If size is explicitely set, abbreviate the output string to the expected length |
void |
setAutocomplete(java.lang.Boolean autocomplete)
|
void |
setExcludeMax(boolean excludeMax)
Set the excludeMax attribute of the input tag. |
void |
setExcludeMin(boolean excludeMin)
Set the excludeMin attribute of the input tag. |
void |
setMax(java.math.BigDecimal max)
|
void |
setMax(org.joda.time.DateTime date)
|
void |
setMin(java.math.BigDecimal min)
|
void |
setMin(org.joda.time.DateTime date)
Sets the min of a date field. |
void |
setPrecision(java.lang.Integer precision)
|
void |
setScale(java.lang.Integer scale)
|
void |
setSize(java.lang.Integer size)
|
| Methods inherited from class org.loom.tags.AbstractFormInputTag |
getLabelCssClass, getLabelPosition, getRenderAsText, getRenderLabel, getTranslatedLabel, getValidators, getValue, hasError, initTag, isBound, isEscapeHTML, isTranslateLabel, setAddTranslatedName, setBound, setEscapeHTML, setLabelClass, setLabelPos, setLabelPosition, setRenderAsText, setRenderErrorDisplayComponent, setRenderLabel, setTranslateLabel, setValue, shouldRenderAsText, shouldRenderError, shouldRenderLabel |
| Methods inherited from class org.loom.tags.AbstractFormFieldTag |
getForm, getHelpLine, getLabel, getNormalizedName, getTabindex, isDisabled, setAlt, setDisabled, setForm, setHelpLine, setLabel, setName, setTabindex, setType |
| Methods inherited from class org.loom.tags.AbstractHtmlTag |
addCssClass, getAccesskey, getCssBuilder, getCssClass, getDir, getId, getLang, getName, getStyle, getTitle, getTranslatedTitle, identify, isCssProcessed, isIf, isTranslateTitle, renderTag, setAccesskey, setCssClass, setCssProcessed, setDir, setId, setIf, setLang, setStyle, setTitle, setTranslateTitle |
| Methods inherited from class org.loom.tags.AbstractTag |
createWriterWrapper, doBody, doBufferedBody, endTag, evaluateExpression, getActionProperty, getAncestorWithClass, getBufferedBody, getExtendedAttributes, getMessagesRepository, getPageContext, getRequest, getResponse, getScopedAttribute, getWriter, removeScopedAttribute, setDynamicAttribute, setExtendedAttribute, setJspContext, setRequest, setResponse, setScopedAttribute, setWriter |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_SIZE
public static int DEFAULT_MAX_SIZE
- default max size when calculating automatically from the maxlength
InputTextTag
public InputTextTag()
doTagImpl
public void doTagImpl()
throws javax.servlet.jsp.JspException,
java.io.IOException
- Description copied from class:
AbstractTag
- The method that must be implemented by the child class
- Specified by:
doTagImpl in class AbstractTag
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
setExcludeMin
public void setExcludeMin(boolean excludeMin)
- Set the excludeMin attribute of the input tag. If excludeMin == false
(the default) the value will be ignored.
- Specified by:
setExcludeMin in interface NumberFieldTag
renderAsText
public java.lang.String renderAsText()
- If size is explicitely set, abbreviate the output string to the expected length
- Overrides:
renderAsText in class AbstractFormInputTag
setExcludeMax
public void setExcludeMax(boolean excludeMax)
- Set the excludeMax attribute of the input tag. If excludeMax == true
(the default) the value will be ignored.
- Specified by:
setExcludeMax in interface NumberFieldTag
setPrecision
public void setPrecision(java.lang.Integer precision)
- Specified by:
setPrecision in interface NumberFieldTag
setScale
public void setScale(java.lang.Integer scale)
- Specified by:
setScale in interface NumberFieldTag
setSize
public void setSize(java.lang.Integer size)
getAutocomplete
public java.lang.Boolean getAutocomplete()
setAutocomplete
public void setAutocomplete(java.lang.Boolean autocomplete)
setMin
public void setMin(java.math.BigDecimal min)
- Specified by:
setMin in interface NumberFieldTag
setMax
public void setMax(java.math.BigDecimal max)
- Specified by:
setMax in interface NumberFieldTag
setMin
public void setMin(org.joda.time.DateTime date)
- Sets the min of a date field. Dates are converted toISO8601 per the spec.
TODO: should timezones be considered here?
setMax
public void setMax(org.joda.time.DateTime date)
getMin
public java.lang.String getMin()
getMax
public java.lang.String getMax()