ImageButton Class
- public class ImageButton
extends AbstractBaseTag
implements IAttributeConsumer
Generates an <input type="image"> tag with the specified attributes. ImageButton
ignores its body content.
| Attribute Descriptions |
| Attribute | Required | Runtime Expression Evaluation |
Data Bindable |
| accessKey | No | No | No |
| Define the keyboard navigation key for the element. |
| align | No | No | No |
| Property to specify where to align the image. |
| alt | No | No | Read Only |
| Property to specify alt text of an image. |
| disabled | No | No | Read Only |
| A boolean value which if true will cause the ImageButton to be disabled. |
| height | No | No | Read Only |
| The image height |
| hspace | No | No | Read Only |
| The horizontal spacing around the image |
| id | No | No | No |
The id attribute has been deprecated; instead, use
tagId. The id attribute of the generated ImageButton. You should use the
tagId which will encode the id correctly for containers such as the Portal
which needs to rewrite IDs to make them unique. |
| page | No | No | No |
The page attribute has been deprecated. The module-relative
page URL to which this hyperlink will be rendered. |
| rolloverImage | No | No | No |
| The URI of the rollover image |
| src | No | No | Read Only |
| The URI of the image |
| tagId | No | No | No |
The id of this image. The real id written to the HTML stream may be changed
by the container (Portal), but may be looked up with the 'tagId' value through the JavaScript
method getNetuiTagName( tagId, tag ) method written by the <netui:html> tag. |
| value | No | No | No |
| The value of the image button. This attribute has been deprecated. |
| vspace | No | No | Read Only |
| The vertical spacing around the image. |
| width | No | No | Read Only |
| The image width. |
Related Topics
<netui:imageButton> Tag Sample
-
Hierarchy
-
Object
TagSupport
BodyTagSupport
AbstractBaseTag
ImageButton
-
All Implemented Interfaces
-
BodyTag, IAttributeConsumer, IterationTag, Serializable, Tag
Fields from com.bea.wlw.netui.tags.AbstractBaseTag |
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, CLASS, ID, JAVASCRIPT_STATUS, NAME, NETUI_UNIQUE_CNT, ONCLICK, ONDBLCLICK, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, STYLE, TABINDEX |
Methods from com.bea.wlw.netui.tags.AbstractBaseTag |
addTagIdMapping, evaluateAttributeToString, filter, filter, getJavaScriptUtils, getNearestForm, getScriptReporter, getUserLocale, registerTagError, release, renderAttribute, rewriteName, write |
Methods from javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue |
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
align
protected String align
- The alignment for this image.
page
protected String page
- The module-relative URI of the image.
rolloverImage
protected String rolloverImage
- The roll-over image of the ImageButton.
src
protected String src
- The URL of this image.
SRC
public static final String SRC
tagId
protected String tagId
value
protected String value
- The value of the image.
VALUE
public static final String VALUE
ImageButton
public ImageButton()
doAfterBody() Method
public int doAfterBody()
throws JspException
Save the body content of the ImageButton.
-
Overrides
-
BodyTagSupport.doAfterBody()
Exceptions
-
JspException
- if a JSP exception has occurred
doEndTag() Method
public int doEndTag()
throws JspException
Process the end of this tag.
-
Overrides
-
BodyTagSupport.doEndTag()
Exceptions
-
JspException
- if a JSP exception has occurred
doStartTag() Method
public int doStartTag()
throws JspException
Process the start of this tag.
-
Overrides
-
BodyTagSupport.doStartTag()
Exceptions
-
JspException
- if a JSP exception has occurred
getAccessKey() Method
public String getAccessKey()
Gets the accessKey attribute value.
Returns
- the accessKey value.
getAlign() Method
public String getAlign()
Gets the property to specify where to align the image.
Returns
- the image alignment.
getAlt() Method
public String getAlt()
Gets the property to specify alt text of the image.
Returns
- the alt string.
getDisabled() Method
public String getDisabled()
Get a boolean value indicating if this ImageButton is disabled or not.
Returns
- the disabled state (true or false)
getHeight() Method
public String getHeight()
Gets the image height.
Returns
- the height.
getHspace() Method
public String getHspace()
Gets the horizontal spacing around the image.
Returns
- the horizontal spacing.
getId() Method
public String getId()
Gets the imageButton id.
-
Overrides
-
TagSupport.getId()
Returns
- the id.
getOnBlur() Method
public String getOnBlur()
Gets the onBlur javascript event.
Returns
- the onBlur event.
getOnChange() Method
public String getOnChange()
Gets the onChange javascript event.
Returns
- the onChange event.
getOnClick() Method
public String getOnClick()
Gets the onClick javascript event.
Returns
- the onClick event.
getOnDblClick() Method
public String getOnDblClick()
Gets the onDblClick javascript event.
Returns
- the onDblClick event.
getOnFocus() Method
public String getOnFocus()
Gets the onFocus javascript event.
Returns
- the onFocus event.
getOnKeyDown() Method
public String getOnKeyDown()
Gets the onKeyDown javascript event.
Returns
- the onKeyDown event.
getOnKeyPress() Method
public String getOnKeyPress()
Gets the onKeyPress javascript event.
Returns
- the onKeyPress event.
getOnKeyUp() Method
public String getOnKeyUp()
Gets the onKeyUp javascript event.
Returns
- the onKeyUp event.
getOnMouseDown() Method
public String getOnMouseDown()
Gets the onMouseDown javascript event.
Returns
- the onMouseDown event.
getOnMouseMove() Method
public String getOnMouseMove()
Gets the onMouseMove javascript event.
Returns
- the onMouseMove event.
getOnMouseOut() Method
public String getOnMouseOut()
Gets the onMouseOut javascript event.
Returns
- the onMouseOut event.
getOnMouseOver() Method
public String getOnMouseOver()
Gets the onMouseOver javascript event.
Returns
- the onMouseOver event.
getOnMouseUp() Method
public String getOnMouseUp()
Gets the onMouseUp javascript event.
Returns
- the onMouseUp event.
getOnSelect() Method
public String getOnSelect()
Gets the onSelect javascript event.
Returns
- the onSelect event.
getPage() Method
public String getPage()
Gets the module-relative path, starting with a slash character, of the
image to be displayed by this rendered tag.
Returns
- the module-relative path.
getRolloverImage() Method
public String getRolloverImage()
Gets the roll-over image of the ImageAnchor.
Returns
- the rollover image.
getSrc() Method
public String getSrc()
Gets the image source URI.
Returns
- the source URI.
getStyle() Method
public String getStyle()
Gets the style of the rendered html tag.
Returns
- the style.
getStyleClass() Method
public String getStyleClass()
Gets the style class of the rendered html tag.
Returns
- the style class.
getTabindex() Method
public String getTabindex()
Gets the tabIndex of the rendered html tag.
Returns
- the tabindex.
getTagId() Method
public String getTagId()
Return the ID of the imageButton. The id may be rewritten by the container (such
as a portal) to make sure it is unique. JavaScript my lookup the actual id
of the element by looking it up in the netui_names table written
into the HTML.
Returns
- the tagId.
getTagName() Method
public String getTagName()
Return the name of the Tag.
-
Overrides
-
AbstractBaseTag.getTagName()
getValue() Method
public String getValue()
Returns the value of the ImageButton.
Returns
- the ImageButton value.
getVspace() Method
public String getVspace()
Gets the vertical spacing around the image.
Returns
- the vertical spacing.
getWidth() Method
public String getWidth()
Gets the image width.
Returns
- the image width.
localRelease() Method
protected void localRelease()
Release any acquired resources.
-
Overrides
-
AbstractBaseTag.localRelease()
setAccessKey(String) Method
public void setAccessKey(String accessKey)
Sets the accessKey attribute value. This should key value of the
keyboard navigation key. It is recommended not to use the following
values because there are often used by browsers A, C, E, F, G,
H, V, left arrow, and right arrow.
Parameters
-
accessKey
- - the accessKey value.
setAlign(String) Method
public void setAlign(String align)
Sets the property to specify where to align the image.
Parameters
-
align
- - the image alignment.
setAlt(String) Method
public void setAlt(String alt)
Sets the property to specify the alt text of the image.
Parameters
-
alt
- - the image alignment.
setAttribute(String, String) Method
public void setAttribute(String name,
String value)
throws JspException
Set an attribute value. The name represents
the name of the attribute.
The value represents the value and may contain
a netui expression. This method may result in errors being generated.
This requires that the tag buffer its body and
write attributes in the end tag. For the imagebutton tag it is not legal to set
the id, name, src, or value attributes with this method.
Parameters
-
name
- The name of the attribute. This value may not be null or the empty string.
-
value
- The value of the attribute. This may contain a netui expression.
Exceptions
-
JspException
- A JspException may be thrown if there is an error setting the attribute.
setDisabled(String) Method
public void setDisabled(String disabled)
Sets the disable stat of this ImageButton.
Parameters
-
disabled
- - true or false
setHeight(String) Method
public void setHeight(String height)
Sets the image height.
Parameters
-
height
- - the height.
setHspace(String) Method
public void setHspace(String hspace)
Sets the the horizontal spacing around the image.
Parameters
-
hspace
- - the horizontal spacing.
setId(String) Method
public void setId(String id)
Sets the imageButton id.
-
Overrides
-
TagSupport.setId(String)
Parameters
-
id
- - the imageBtton id.
The id attribute is deprecated, use the tagId attribute instead.
The id attribute of the rendered HTML tag.
You should use the tagId attribute which will encode the id correctly for containers such as the Portal
which needs to rewrite id's to make them unique.
setOnBlur(String) Method
public void setOnBlur(String onblur)
Sets the onBlur javascript event.
Parameters
-
onblur
- - the onBlur event.
setOnChange(String) Method
public void setOnChange(String onchange)
Sets the onChange javascript event.
Parameters
-
onchange
- - the onChange event.
setOnClick(String) Method
public void setOnClick(String onclick)
Sets the onClick javascript event.
Parameters
-
onclick
- - the onClick event.
setOnDblClick(String) Method
public void setOnDblClick(String ondblclick)
Sets the onDblClick javascript event.
Parameters
-
ondblclick
- - the onDblClick event.
setOnFocus(String) Method
public void setOnFocus(String onblur)
Sets the onFocus javascript event.
Parameters
-
onblur
- - the onFocus event.
setOnKeyDown(String) Method
public void setOnKeyDown(String onkeydown)
Sets the onKeyDown javascript event.
Parameters
-
onkeydown
- - the onKeyDown event.
setOnKeyPress(String) Method
public void setOnKeyPress(String onkeypress)
Sets the onKeyPress javascript event.
Parameters
-
onkeypress
- - the onKeyPress event.
setOnKeyUp(String) Method
public void setOnKeyUp(String onkeyup)
Sets the onKeyUp javascript event.
Parameters
-
onkeyup
- - the onKeyUp event.
setOnMouseDown(String) Method
public void setOnMouseDown(String onmousedown)
Sets the onMouseDown javascript event.
Parameters
-
onmousedown
- - the onMouseDown event.
setOnMouseMove(String) Method
public void setOnMouseMove(String onmousemove)
Sets the onMouseMove javascript event.
Parameters
-
onmousemove
- - the onMouseMove event.
setOnMouseOut(String) Method
public void setOnMouseOut(String onmouseout)
Sets the onMouseOut javascript event.
Parameters
-
onmouseout
- - the onMouseOut event.
setOnMouseOver(String) Method
public void setOnMouseOver(String onmouseover)
Sets the onMouseOver javascript event.
Parameters
-
onmouseover
- - the onMouseOver event.
setOnMouseUp(String) Method
public void setOnMouseUp(String onmouseup)
Sets the onMouseUp javascript event.
Parameters
-
onmouseup
- - the onMouseUp event.
setOnSelect(String) Method
public void setOnSelect(String onselect)
Sets the onSelect javascript event.
Parameters
-
onselect
- - the onSelect event.
setPage(String) Method
public void setPage(String page)
Sets the module-relative path, starting with a slash character, of the
image to be displayed by this rendered tag.
Parameters
-
page
- - the module-relative path.
setRolloverImage(String) Method
public void setRolloverImage(String rolloverImage)
Sets the roll-over image of the ImageAnchor.
Parameters
-
rolloverImage
- - the rollover image.
setSrc(String) Method
public void setSrc(String src)
Sets the image source URI.
Parameters
-
src
- - the source URI.
setStyle(String) Method
public void setStyle(String style)
Sets the style of the rendered html tag.
Parameters
-
style
- - the html style.
setStyleClass(String) Method
public void setStyleClass(String styleClass)
Sets the style class of the rendered html tag.
Parameters
-
styleClass
- - the html style class.
setTabindex(String) Method
public void setTabindex(String tabindex)
Sets the tabIndex of the rendered html tag.
Parameters
-
tabindex
- - the tab index.
setTagId(String) Method
public void setTagId(String tagId)
Set the ID of the anchor.
Parameters
-
tagId
- - the tagId.
setValue(String) Method
public void setValue(String value)
Set the value of the ImageButton.
Parameters
-
value
- - the value of the ImageButton.
setVspace(String) Method
public void setVspace(String vspace)
Sets the vertical spacing around the image.
Parameters
-
vspace
- - the vertical spacing.
setWidth(String) Method
public void setWidth(String width)
Sets the image width.
Parameters
-
width
- - the image width.