public class Icon extends StylableTag
Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:icon image="required.png" />
Syntax:
<base:icon id=... clazz=... style=... image=... tooltip=... visible=... tabindex=... >
Attribute | Default value | Required | Description |
id | - | no | The ID of the icon. 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 | icon | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different icons.
|
style | - | no |
The value if this attribute goes directly into the standard HTML
style attribute. This allows you to apply different styles
to different icons.
|
image | yes |
The name of the image to display. The image must be in the /images
directory. Only include the filename, not the path.
This taglib will find the correct path from the current jsp page.
|
|
tooltip | no | A short explanation that will show up as a tooltip. | |
visible | true | no | If the note should be visible or not. |
tabindex | 0 | no | Tab index value to control the focus order. Use -1 to disable tabbing to the icon. |
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled
If the icon should be enabled or not (if an onclick has been set).
|
private java.lang.String |
image
The filename of the image.
|
private Page |
page
The parent <base:page> tag.
|
private static long |
serialVersionUID |
private int |
tabIndex |
private java.lang.String |
tooltip
An optional tooltip.
|
private boolean |
visible
If the icon should be visible or not.
|
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
Icon() |
Modifier and Type | Method and Description |
---|---|
int |
doEndTag() |
int |
doStartTag() |
java.lang.String |
getImage() |
int |
getTabindex() |
java.lang.String |
getTooltip() |
boolean |
isEnabled() |
boolean |
isVisible() |
void |
setEnabled(boolean enabled) |
void |
setImage(java.lang.String image) |
void |
setTabindex(int tabIndex) |
void |
setTooltip(java.lang.String tooltip) |
void |
setVisible(boolean visible) |
addDynamicAttributes, addIdAndStyles, getClazz, getDynamicActionAttributes, getDynamicAttribute, getFullClass, getIdPrefix, getStyle, getSubclass, initDefaultAttributes, setClazz, setDynamicAttribute, setMoreDynamicAttributes, setPageContext, setStyle, setSubclass
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
private static final long serialVersionUID
private Page page
private java.lang.String image
private java.lang.String tooltip
private boolean visible
private boolean enabled
private int tabIndex
public void setImage(java.lang.String image)
public java.lang.String getImage()
public void setVisible(boolean visible)
public boolean isVisible()
public void setEnabled(boolean enabled)
public boolean isEnabled()
public void setTooltip(java.lang.String tooltip)
public java.lang.String getTooltip()
public void setTabindex(int tabIndex)
public int getTabindex()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException