ImageAnchor Class

com.bea.wlw.netui.tags.html
ImageAnchor Class

public class ImageAnchor

    extends Anchor

Generates a hyperlink with a clickable image. ImageAnchor provides support for image rollovers. An imageAnchor must have one of five attributes to correctly create the hyperlink:

Attribute Descriptions
AttributeRequiredRuntime Expression Evaluation Data Bindable
accessKeyNoNoNo
Define the keyboard navigation key for the element.
actionNoNoRead Only
An action invoked by clicking the link.
alignNoNoNo
Property to specify where to align the image.
altNoNoRead Only
Property to specify alt text of an image.
borderNoNoRead Only
The border size around the image
formSubmitNoNoNo
True if clicking this link should submit its enclosing form.
forwardNoNoNo
The logical forward name from which to retrieve the hyperlink URI.
heightNoNoRead Only
The image height
hrefNoNoRead Only
A URL to go to.
hspaceNoNoRead Only
The horizontal spacing around the image
idNoNoNo
The id attribute has been deprecated; instead, use tagId. The id attribute of the generated ImageAnchor. 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.
isMapNoNoNo
The server-side image map declaration.
linkNameNoNoNo
An internal place in the page to move to.
locationNoNoNo
Location within the URI to visit.
lowsrcNoNoNo
The low resolution image source URI.
pageNoNoNo
The page attribute has been deprecated. The module-relative page URL to which this hyperlink will be rendered.
rolloverImageNoNoNo
The URI of the rollover image.
srcNoNoRead Only
The image source URI
targetNoNoNo
The window target.
tagIdNoNoNo
The id of this imageAnchor. 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.
useMapNoNoNo
The client-side image map declaration.
vspaceNoNoRead Only
The vertical spacing around the image.
widthNoNoRead Only
The image width.

Related Topics

<netui:imageAnchor> Tag Sample


Hierarchy
Object
  TagSupport
    BodyTagSupport
      AbstractBaseTag
        Anchor
          ImageAnchor
All Implemented Interfaces

BodyTag, IAttributeConsumer, IterationTag, Serializable, Tag, URLParams

Field Summary

protected String
src
String
   
Fields from  com.bea.wlw.netui.tags.html.Anchor
HREF, id
 
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
 
Fields from  javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields from  javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 

Constructor Summary

ImageAnchor()

 

Method Summary

protected void
createAnchorAttributes(UnsyncStringBuffer results)
Override so we only write the style and javascript attributes on the anchor.
public int
doEndTag()
Render the image and hyperlink.
public int
doStartTag()
Insert rollover javascript.
public String
getAccessKey()
Gets the accessKey attribute value.
public String
getAlign()
Gets the property to specify where to align the image.
public String
getAlt()
Gets the property to specify alt text of the image.
public String
getBorder()
Gets the border size around the image.
public String
getHeight()
Gets the image height.
public String
getHspace()
Gets the horizontal spacing around the image.
public String
getIsmap()
Gets the server-side image map declaration.
public String
getLowsrc()
Gets the low resolution image source URI.
public String
getPage()
Gets the module-relative path, starting with a slash character, of the image to be displayed by this rendered tag.
public String
getRolloverImage()
Gets the roll-over image of the ImageAnchor.
public String
getSrc()
Gets the image source URI.
public String
getTagName()
Return the name of the Tag.
public String
getUsemap()
Gets the client-side image map declaration.
public String
getVspace()
Gets the vertical spacing around the image.
public String
getWidth()
Gets the image width.
protected void
localRelease()
Release any acquired resources.
public void
setAccessKey(String accessKey)
Sets the accessKey attribute value.
public void
setAlign(String align)
Sets the property to specify where to align the image.
public void
setAlt(String alt)
Sets the property to specify the alt text of the image.
public void
setBorder(String border)
Sets the border size around the image.
public void
setHeight(String height)
Sets the image height.
public void
setHspace(String hspace)
Sets the the horizontal spacing around the image.
public void
setIsmap(String ismap)
Sets the server-side image map declaration.
public void
setLowsrc(String lowsrc)
Sets the the low resolution image source URI.
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.
public void
setRolloverImage(String rolloverImage)
Sets the roll-over image of the ImageAnchor.
public void
setSrc(String src)
Sets the image source URI.
public void
setUsemap(String usemap)
Sets the client-side image map declaration.
public void
setVspace(String vspace)
Sets the vertical spacing around the image.
public void
setWidth(String width)
Sets the image width.
 
Methods from  com.bea.wlw.netui.tags.html.Anchor
addParameter, createAnchorBeginTag, doAfterBody, getAction, getFormSubmit, getForward, getHref, getId, getLinkName, getLocation, getOnBlur, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRealFormName, getStyle, getStyleClass, getTabindex, getTagId, getTarget, setAction, setAttribute, setFormSubmit, setForward, setHref, setId, setLinkName, setLocation, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStyle, setStyleClass, setTabindex, setTagId, setTarget,
 
Methods from  com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, evaluateAttributeToString, filter, filter, getJavaScriptUtils, getNearestForm, getScriptReporter, getTagName, getUserLocale, localRelease, registerTagError, release, renderAttribute, rewriteName, write
 
Methods from  javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods from  javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.jsp.tagext.BodyTag
doInitBody, setBodyContent
 
Methods from interface com.bea.wlw.netui.tags.IAttributeConsumer
setAttribute
 
Methods from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 
Methods from interface com.bea.wlw.netui.tags.html.URLParams
addParameter
 

Field Detail

src

protected String src

 

Constructor Detail

ImageAnchor

public ImageAnchor()
 

Method Detail

createAnchorAttributes(UnsyncStringBuffer) Method

protected void createAnchorAttributes(UnsyncStringBuffer results)
Override so we only write the style and javascript attributes on the anchor.

Overrides
Anchor.createAnchorAttributes(UnsyncStringBuffer)

doEndTag() Method

public int doEndTag()
throws JspException
Render the image and hyperlink.

Overrides
Anchor.doEndTag()

Exceptions

JspException
if a JSP exception has occurred

doStartTag() Method

public int doStartTag()
throws JspException
Insert rollover javascript.

Support for indexed property since Struts 1.1

Overrides
Anchor.doStartTag()

Exceptions

JspException
if a JSP exception has occurred

getAccessKey() Method

public String getAccessKey()
Gets the accessKey attribute value.

Overrides
Anchor.getAccessKey()

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.

getBorder() Method

public String getBorder()
Gets the border size around the image.

Returns

the border size.

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.

getIsmap() Method

public String getIsmap()
Gets the server-side image map declaration.

Returns

the image map declaration.

getLowsrc() Method

public String getLowsrc()
Gets the low resolution image source URI.

Returns

the low-res image source URI.

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.

Overrides
Anchor.getPage()

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 image source URI.

getTagName() Method

public String getTagName()
Return the name of the Tag.

Overrides
Anchor.getTagName()

getUsemap() Method

public String getUsemap()
Gets the client-side image map declaration.

Returns

the map declaration.

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
Anchor.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.

Overrides
Anchor.setAccessKey(String)

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.

setBorder(String) Method

public void setBorder(String border)
Sets the border size around the image.

Parameters

border
- the border size.

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.

setIsmap(String) Method

public void setIsmap(String ismap)
Sets the server-side image map declaration.

Parameters

ismap
- the image map declaration.

setLowsrc(String) Method

public void setLowsrc(String lowsrc)
Sets the the low resolution image source URI.

Parameters

lowsrc
- the low-res image source URI.

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.

Overrides
Anchor.setPage(String)

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 image source URI.

setUsemap(String) Method

public void setUsemap(String usemap)
Sets the client-side image map declaration.

Parameters

usemap
- the map declaration.

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.