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
public class Input extends StylableTag
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=... >
Tag attributes 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:icon = document.getElementById('<id>');
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
checked
TRUE if the input element is checked.private String
name
The name of the input element.private static long
serialVersionUID
private int
tabIndex
private String
title
An optional title.private String
type
The type of input.private String
value
The value of the input element.private boolean
visible
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
Constructors Constructor Description Input()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doStartTag()
String
getName()
int
getTabindex()
String
getTitle()
String
getType()
String
getValue()
boolean
isChecked()
boolean
isVisible()
void
setChecked(boolean checked)
void
setName(int name)
void
setName(String name)
void
setTabindex(int tabIndex)
void
setTitle(String title)
void
setType(String type)
void
setValue(int value)
void
setValue(String value)
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, 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 Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
type
private String type
The type of input.
-
name
private String name
The name of the input element. If not set, the ID is used.
-
value
private String value
The value of the input element.
-
checked
private boolean checked
TRUE if the input element is checked.
-
title
private String title
An optional title.
-
visible
private boolean visible
If the input should be visible or not.
-
tabIndex
private int tabIndex
-
-
Method Detail
-
setType
public void setType(String type)
-
getType
public String getType()
-
setName
public void setName(String name)
-
setName
public void setName(int name)
-
getName
public String getName()
-
setValue
public void setValue(String value)
-
setValue
public void setValue(int value)
-
getValue
public String getValue()
-
setChecked
public void setChecked(boolean checked)
-
isChecked
public boolean isChecked()
-
setVisible
public void setVisible(boolean visible)
-
isVisible
public boolean isVisible()
-
setTitle
public void setTitle(String title)
-
getTitle
public String getTitle()
-
setTabindex
public void setTabindex(int tabIndex)
-
getTabindex
public int getTabindex()
-
doStartTag
public int doStartTag() throws JspException
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-
-