org.apache.beehive.netui.tags.databinding.datagrid
Class ImageAnchorCell

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by AbstractDataGridHtmlTag
              extended by AbstractCell
                  extended by AbstractHtmlTableCell
                      extended by ImageAnchorCell
All Implemented Interfaces:
JspTag, SimpleTag, IFormattable, IUrlParams, IAttributeConsumer, IBehaviorConsumer, INetuiTag

public class ImageAnchorCell
extends AbstractHtmlTableCell
implements IFormattable, IUrlParams

This tag is a data grid cell used to render an HTML image inside of an anchor. This tag should be used inside of a <netui-data:rows> tag when rendering a data set with the <netui-data:dataGrid> tag. The rendered output is structured as:

   <a ...><img .../>
 
If the setHref(String) attribute is set, the href will be rendered on the anchor. If the setAction(String) attribute is set, it must reference an action that is valid in the context of the current Page Flow. Only one of these two attributes may be set. The image source to render on the image tag is specified using the setSrc(String) attribute.

The set of JSP implicit objects available to the body include:


Constructor Summary
ImageAnchorCell()
           
 
Method Summary
 void addParameter(String name, Object value, String facet)
           Implementation of the IUrlParams interface.
 String getTagName()
          The name of this tag; this value is used for error reporting.
protected  CellModel internalGetCellModel()
          Implementation of AbstractCell.internalGetCellModel() that exposes the ImageAnchorCellModel which is storing state for this tag.
protected  void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput)
          Render the contents of the HTML anchor and image.
 void setAction(String action)
          Set the name of the action for the HTML anchor tag.
 void setAlign(String align)
          Sets the alignment attribute for the HTML image tag.
 void setAlt(String alt)
          Sets the alt text attribute for the HTML image tag.
 void setAnchorTagId(String tagId)
          Set the name of the tagId for the HTML image tag..
 void setAttribute(String name, String value, String facet)
           Implementation of the IAttributeConsumer interface.
 void setBorder(String border)
          Sets the border size attribute for the HTML image tag.
 void setCharSet(String charSet)
          Sets charset attribute for the HTML anchor tag
 void setHeight(String height)
          Sets the image height attribute for the HTML image tag.
 void setHref(String href)
          Sets the href of the HTML anchor tag.
 void setHrefLang(String hreflang)
          Sets hreflang attribute for the HTML anchor tag.
 void setHspace(String hspace)
          Sets the the horizontal spacing attribute for the HTML image tag.
 void setImageStyle(String imageStyle)
          Set the <img> style for the contained image.
 void setImageStyleClass(String imageClass)
          Set the label style class for each contained Image.
 void setIsmap(String ismap)
          Sets the server-side image map declaration for the HTML image tag.
 void setLongdesc(String longdesc)
          Sets the longdesc attribute for the HTML image tag.
 void setOnClick(String onClick)
          Sets the onClick JavaScript for the HTML anchor tag.
 void setOnDblClick(String onDblClick)
          Sets the onDblClick JavaScript for the HTML anchor tag.
 void setOnKeyDown(String onKeyDown)
          Sets the onKeyDown JavaScript for the HTML anchor tag.
 void setOnKeyPress(String onKeyPress)
          Sets the onKeyPress JavaScript for the HTML anchor tag.
 void setOnKeyUp(String onKeyUp)
          Sets the onKeyUp JavaScript for the HTML anchor tag.
 void setOnMouseDown(String onMouseDown)
          Sets the onMouseDown JavaScript for the HTML anchor tag.
 void setOnMouseMove(String onMouseMove)
          Sets the onMouseMove JavaScript for the HTML anchor tag.
 void setOnMouseOut(String onMouseOut)
          Sets the onMouseOut JavaScript for the HTML anchor tag.
 void setOnMouseOver(String onMouseOver)
          Sets the onMouseOver JavaScript for the HTML anchor tag.
 void setOnMouseUp(String onMouseUp)
          Sets the onMouseUp JavaScript for the HTML anchor tag.
 void setRel(String rel)
          Sets rel attribute for the HTML anchor tag.
 void setRev(String rev)
          Sets rev attribute for the HTML anchor tag.
 void setSrc(String src)
          Sets the image source URI for the HTML image tag.
 void setStyle(String style)
          Sets the style of the rendered HTML anchor tag.
 void setStyleClass(String styleClass)
          Sets the style class of the rendered HTML anchor tag.
 void setTagId(String tagId)
          Set the name of the tagId for the HTML image tag.
 void setTarget(String target)
          Sets the window target for the HTML anchor tag.
 void setTargetScope(String targetScope)
          Set the target "scope" for the anchor's action.
 void setTitle(String title)
          Sets the value of the title attribute for the HTML anchor tag.
 void setType(String type)
          Sets type attribute for the HTML anchor tag.
 void setUsemap(String usemap)
          Sets the client-side image map declaration for the HTML iage tag.
 void setVspace(String vspace)
          Sets the vertical spacing around the HTML image tag.
 void setWidth(String width)
          Sets the width attribute for the HTML image tag.
 
Methods inherited from class AbstractHtmlTableCell
renderCell, setBehavior, setCellAbbr, setCellAlign, setCellAxis, setCellChar, setCellCharoff, setCellColspan, setCellDir, setCellHeaders, setCellLang, setCellOnClick, setCellOnDblClick, setCellOnKeyDown, setCellOnKeyPress, setCellOnKeyUp, setCellOnMouseDown, setCellOnMouseMove, setCellOnMouseOut, setCellOnMouseOver, setCellOnMouseUp, setCellRowspan, setCellScope, setCellStyle, setCellStyleClass, setCellTagId, setCellTitle, setCellValign, setFilterExpression, setSortExpression
 
Methods inherited from class AbstractCell
addFormatter, addStateAttribute, applyAttributes, doTag, formatterHasError, renderEmptyCell
 
Methods inherited from class AbstractDataGridHtmlTag
applyIndexedTagId, applyTagId, lookupDataGridTagModel, renderDefaultNameAndId, renderNameAndId
 
Methods inherited from class AbstractSimpleTag
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface IFormattable
addFormatter, formatterHasError
 

Constructor Detail

ImageAnchorCell

public ImageAnchorCell()
Method Detail

getTagName

public String getTagName()
The name of this tag; this value is used for error reporting.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractSimpleTag
Returns:
the String name of this tag

setOnClick

public void setOnClick(String onClick)
Sets the onClick JavaScript for the HTML anchor tag.

Parameters:
onClick - the onClick event.

setOnDblClick

public void setOnDblClick(String onDblClick)
Sets the onDblClick JavaScript for the HTML anchor tag.

Parameters:
onDblClick - the onDblClick event.

setOnKeyDown

public void setOnKeyDown(String onKeyDown)
Sets the onKeyDown JavaScript for the HTML anchor tag.

Parameters:
onKeyDown - the onKeyDown event.

setOnKeyUp

public void setOnKeyUp(String onKeyUp)
Sets the onKeyUp JavaScript for the HTML anchor tag.

Parameters:
onKeyUp - the onKeyUp event.

setOnKeyPress

public void setOnKeyPress(String onKeyPress)
Sets the onKeyPress JavaScript for the HTML anchor tag.

Parameters:
onKeyPress - the onKeyPress event.

setOnMouseDown

public void setOnMouseDown(String onMouseDown)
Sets the onMouseDown JavaScript for the HTML anchor tag.

Parameters:
onMouseDown - the onMouseDown event.

setOnMouseUp

public void setOnMouseUp(String onMouseUp)
Sets the onMouseUp JavaScript for the HTML anchor tag.

Parameters:
onMouseUp - the onMouseUp event.

setOnMouseMove

public void setOnMouseMove(String onMouseMove)
Sets the onMouseMove JavaScript for the HTML anchor tag.

Parameters:
onMouseMove - the onMouseMove event.

setOnMouseOut

public void setOnMouseOut(String onMouseOut)
Sets the onMouseOut JavaScript for the HTML anchor tag.

Parameters:
onMouseOut - the onMouseOut event.

setOnMouseOver

public void setOnMouseOver(String onMouseOver)
Sets the onMouseOver JavaScript for the HTML anchor tag.

Parameters:
onMouseOver - the onMouseOver event.

setStyle

public void setStyle(String style)
Sets the style of the rendered HTML anchor tag.

Parameters:
style - the html style.

setStyleClass

public void setStyleClass(String styleClass)
Sets the style class of the rendered HTML anchor tag.

Parameters:
styleClass - the style class.

setTitle

public void setTitle(String title)
Sets the value of the title attribute for the HTML anchor tag.

Parameters:
title - the title

setCharSet

public void setCharSet(String charSet)
Sets charset attribute for the HTML anchor tag

Parameters:
charSet - the charset

setType

public void setType(String type)
Sets type attribute for the HTML anchor tag.

Parameters:
type - the type

setHrefLang

public void setHrefLang(String hreflang)
Sets hreflang attribute for the HTML anchor tag.

Parameters:
hreflang - the hreflang.

setRel

public void setRel(String rel)
Sets rel attribute for the HTML anchor tag.

Parameters:
rel - the rel attribute

setRev

public void setRev(String rev)
Sets rev attribute for the HTML anchor tag.

Parameters:
rev - the rev attribute.

setTarget

public void setTarget(String target)
Sets the window target for the HTML anchor tag.

Parameters:
target - the window target

setHref

public void setHref(String href)
Sets the href of the HTML anchor tag. This attribute will accept the empty String as a legal value.

Parameters:
href - the hyperlink URI for the anchor.

setTargetScope

public void setTargetScope(String targetScope)
Set the target "scope" for the anchor's action. Multiple active page flows may exist concurrently within named scopes. This attribute selects which named scope to use. If omitted, the default scope is assumed.

Parameters:
targetScope - the name of the target scope in which the associated action's page flow resides.

setAction

public void setAction(String action)
               throws JspException
Set the name of the action for the HTML anchor tag. This action name must be valid given the current Page Flow.

Parameters:
action - the name of the action to set for the anchor tag.
Throws:
JspException

setAlign

public void setAlign(String align)
Sets the alignment attribute for the HTML image tag.

Parameters:
align - the image alignment.

setAlt

public void setAlt(String alt)
Sets the alt text attribute for the HTML image tag.

Parameters:
alt - the alt attribute.

setLongdesc

public void setLongdesc(String longdesc)
Sets the longdesc attribute for the HTML image tag.

Parameters:
longdesc - the longdesc attribute

setBorder

public void setBorder(String border)
Sets the border size attribute for the HTML image tag.

Parameters:
border - the border size.

setHeight

public void setHeight(String height)
Sets the image height attribute for the HTML image tag.

Parameters:
height - the height.

setHspace

public void setHspace(String hspace)
Sets the the horizontal spacing attribute for the HTML image tag.

Parameters:
hspace - the horizontal spacing.

setIsmap

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

Parameters:
ismap - the image map declaration.

setSrc

public void setSrc(String src)
            throws JspException
Sets the image source URI for the HTML image tag.

Parameters:
src - the image source URI.
Throws:
JspException

setUsemap

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

Parameters:
usemap - the map declaration.

setVspace

public void setVspace(String vspace)
Sets the vertical spacing around the HTML image tag.

Parameters:
vspace - the vertical spacing.

setImageStyle

public void setImageStyle(String imageStyle)
Set the <img> style for the contained image. When the tag library is running in legacy mode, this will override the style attribute if that is set. If this is not set, and style is set, then it will be applied to the image.

Parameters:
imageStyle - the image style

setImageStyleClass

public void setImageStyleClass(String imageClass)
Set the label style class for each contained Image. When the tag library is running in legacy mode, this will override the styleClass attribute if that is set. If this is not set, and styleClass is set, then it will be applied to the image.

Parameters:
imageClass - the image class

setWidth

public void setWidth(String width)
Sets the width attribute for the HTML image tag.

Parameters:
width - the image width.

setTagId

public void setTagId(String tagId)
              throws JspException
Set the name of the tagId for the HTML image tag.

Parameters:
tagId - the the name of the tagId for the image.
Throws:
JspException

setAnchorTagId

public void setAnchorTagId(String tagId)
                    throws JspException
Set the name of the tagId for the HTML image tag..

Parameters:
tagId - the the name of the tagId for the image.
Throws:
JspException

setAttribute

public void setAttribute(String name,
                         String value,
                         String facet)
                  throws JspException

Implementation of the IAttributeConsumer interface. This allows users of this tag to extend the attribute set that is rendered by the HTML image or anchor tags. This method accepts the following facets:

Facet NameOperation
anchorAdds an attribute with the provided name and value to the attributes rendered on the <a> tag.
imageAdds an attribute with the provided name and value to the attributes rendered on the <img> tag.
This tag defaults to the setting attributes on the anchor when the facet name is unset.

Specified by:
setAttribute in interface IAttributeConsumer
Overrides:
setAttribute in class AbstractHtmlTableCell
Parameters:
name - the name of the attribute
value - the value of the attribute
facet - the facet for the attribute
Throws:
JspException - thrown when the facet is not recognized

addParameter

public void addParameter(String name,
                         Object value,
                         String facet)
                  throws JspException

Implementation of the IUrlParams interface. This allows this tag to accept <netui:parameter> and <netui:parameterMap> in order to add URL parameters onto the rendered anchor. For example:

   
       
   
 
will render an HTML image anchor as:
   
 

Specified by:
addParameter in interface IUrlParams
Parameters:
name - the name of the parameter
value - the value of the parameter
facet - the facet for the parameter
Throws:
JspException - thrown when the facet is unsupported

renderDataCellContents

protected void renderDataCellContents(AbstractRenderAppender appender,
                                      String jspFragmentOutput)
Render the contents of the HTML anchor and image. This method calls to an CellDecorator associated with this tag. The result of renderingi is appended to the appender

Specified by:
renderDataCellContents in class AbstractHtmlTableCell
Parameters:
appender - the AbstractRenderAppender to which output should be rendered
jspFragmentOutput - the result of having evaluated this tag's JspFragment

internalGetCellModel

protected CellModel internalGetCellModel()
Implementation of AbstractCell.internalGetCellModel() that exposes the ImageAnchorCellModel which is storing state for this tag.

Specified by:
internalGetCellModel in class AbstractCell
Returns:
this tag's image anchor cell model