Package net.sf.basedb.clients.web.taglib
Class Input
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sf.basedb.clients.web.taglib.StylableTag
net.sf.basedb.clients.web.taglib.Input
- All Implemented Interfaces:
Serializable
,DynamicAttributes
,IterationTag
,JspTag
,Tag
,DynamicActionAttributes
This tag is used to make it easier to add <input> elements
on a BASE web page. It is mainly used for checkboxes and radio buttons.
Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:input type="checkbox" name="item_id" value="55" checked="true" />
Syntax:
<base:icon id=... clazz=... subclass=... style=... type=... name=... value=... checked=... visible=... tabindex=... title=... >
Attribute | Default value | Required | Description |
id | - | no | The ID of the input element. The value of this attribute
goes directly into the standard id attribute.
This means that if you need a reference to the note object in your own
JavaScript code, you may for example use the following code:
|
clazz | - | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different inputs.
|
subclass | - | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different inputs.
|
style | - | no |
The value if this attribute goes directly into the standard HTML
style attribute. This allows you to apply different styles
to different inputs.
|
type | yes | The type of the input element. | |
name | yes | The name of the input element. | |
value | no | The value of the input element. | |
checked | false | no | If the input element should be checked or not. |
title | no | A short explanation that will show up as a tooltip. | |
visible | true | no | If the input should be visible or not. |
tabindex | 0 | no | Tab index value to control the focus order. Use -1 to disable tabbing to the input. |
- Since:
- 3.18.1
- Author:
- Nicklas
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
TRUE if the input element is checked.private String
The name of the input element.private static final long
private int
private String
An optional title.private String
The type of input.private String
The value of the input element.private boolean
If the input should be visible or not.Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getName()
int
getTitle()
getType()
getValue()
boolean
boolean
void
setChecked
(boolean checked) void
setName
(int name) void
void
setTabindex
(int tabIndex) void
void
void
setValue
(int value) void
void
setVisible
(boolean visible) Methods inherited from class net.sf.basedb.clients.web.taglib.StylableTag
addDynamicAttributes, addIdAndStyles, getClazz, getDynamicActionAttributes, getDynamicAttribute, getFullClass, getIdPrefix, getStyle, getSubclass, initDefaultAttributes, resetDynamicAttributes, setClazz, setDynamicAttribute, setMoreDynamicAttributes, setPageContext, setStyle, setSubclass
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
type
The type of input. -
name
The name of the input element. If not set, the ID is used. -
value
The value of the input element. -
checked
private boolean checkedTRUE if the input element is checked. -
title
An optional title. -
visible
private boolean visibleIf the input should be visible or not. -
tabIndex
private int tabIndex
-
-
Constructor Details
-
Input
public Input()
-
-
Method Details
-
setType
-
getType
-
setName
-
setName
public void setName(int name) -
getName
-
setValue
-
setValue
public void setValue(int value) -
getValue
-
setChecked
public void setChecked(boolean checked) -
isChecked
public boolean isChecked() -
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible() -
setTitle
-
getTitle
-
setTabindex
public void setTabindex(int tabIndex) -
getTabindex
public int getTabindex() -
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-