Renders an <input> tag.
The value may be provided in one of three ways, in precedence order:
- Direct child <ao:value> tag.
- As the value attribute
- Contents of tag body, trimmed.
For type="image"
, the src may be provided in one of two ways, in precedence order:
- Direct child <ao:src> tag.
- As the src attribute
Any attribute that has no namespace and begins with param.
is added to the src as a URL parameter.
The parameter name is the part of the attribute name following param.
.
When a parameter value is null
it is not added.
When a parameter value is an Enum, the
value is obtained via Enum.name().
If the value is an
Iterable,
Iterator,
Enumeration,
or array, then each non-null element is coerced to
String
as a separate parameter in iteration order. Otherwise, the value itself is
coerced to String
for the parameter value.
Nested <ao:param> or <ao:params> tags will add parameters after any provided as attributes.
Tag Information
Tag Class: | com.aoapps.taglib.InputTag |
---|---|
TagExtraInfo Class: | com.aoapps.taglib.InputTagTEI |
Body Content: | scriptless |
Display Name: | None |
Dynamic Attributes: | true |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
id | No | Runtime | String |
The id of the element. A nested <ao:id> tag will override this value. |
class | No | Runtime | Object |
The CSS class for the element. A nested <ao:class> tag will override this value. |
dir | No | Runtime | String |
The dir of the element. A nested <ao:dir> tag will override this value. |
style | No | Runtime | Object |
The CSS style for the element. A nested <ao:style> tag will override this value. |
alt | No | Runtime | Object |
The alt text for the input
(only for |
autocomplete | No | Runtime | boolean |
Turns on or off the autocomplete for this input element.
Accepts values of |
checked | No | Runtime | boolean |
The checked attribute.
Accepts values of |
disabled | No | Runtime | boolean |
The disabled attribute.
Accepts values of |
height | No | Runtime | Integer |
The optional height for the image,
(only for |
maxlength | No | Runtime | Integer |
The maxlength of the input element. A nested <ao:maxlength> tag will override this value. |
name | No | Runtime | Object |
The name of the input element. A nested <ao:name> tag will override this value. |
readonly | No | Runtime | boolean |
The readonly attribute.
Accepts values of |
size | No | Runtime | Integer |
The size of the input element. A nested <ao:size> tag will override this value. |
src | No | Runtime | String |
The src for the image
(only for A nested <ao:src> tag will override this value. In order to make relative paths predictable, relative paths are interpreted from the current JSP page. In order to keep paths app-relative, if starts with a /, the context path will be prepended to the path. In order to simplify things behind URL mapping schemes, the src is always written starting with '/'. This avoids any need to include any <ao:base> tags. URL rewriting is performed as needed via HttpServletResponse.encodeURL. To support paths in different character sets, a Unicode to ASCII URI encoding is performed on every character that is not defined in RFC 3986: Reserved Characters. To avoid ambiguity, any dynamic parameters or anchors in the URL must have been correctly encoded by the caller. Any directly nested <ao:param> or <ao:params> tag will add parameters to the src. |
absolute | No | Runtime | boolean |
When |
canonical | No | Runtime | boolean |
When |
addLastModified | No | Runtime | String |
If the src represents a local resource, a parameter of "lastModified=#####" may be
automatically added with the timestamp of the local resource to the nearest second.
May be one of
In auto mode, last modified stamping may be disabled by the client with
the In auto mode, last modified stamping is not performed on Canonical URLs. |
tabindex | No | Runtime | int |
The optional tabindex value. Defaults to |
title | No | Runtime | Object |
The title text for the element. A nested <ao:title> tag will override this value. |
type | No | Runtime | Object |
The type of input element. A nested <ao:type> tag will override this value. |
width | No | Runtime | Integer |
The optional width for the image,
(only for |
value | No | Runtime | Object |
The value of the input element. A nested <ao:value> tag will override this value. If neither is provided, the output of the body is used with whitespace trimmed. |
onblur | No | Runtime | Object |
A JavaScript onblur handler. A nested <ao:onblur> tag will override this value. |
onchange | No | Runtime | Object |
A JavaScript onchange handler. A nested <ao:onchange> tag will override this value. |
onclick | No | Runtime | Object |
A JavaScript onclick handler. A nested <ao:onclick> tag will override this value. |
onerror | No | Runtime | Object |
A JavaScript onerror handler. A nested <ao:onerror> tag will override this value. |
onfocus | No | Runtime | Object |
A JavaScript onfocus handler. A nested <ao:onfocus> tag will override this value. |
onkeypress | No | Runtime | Object |
A JavaScript onkeypress handler. A nested <ao:onkeypress> tag will override this value. |
onload | No | Runtime | Object |
A JavaScript onload handler. A nested <ao:onload> tag will override this value. |