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

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by AbstractDataGridHtmlTag
              extended by AbstractCell
                  extended by AbstractHtmlTableCell
                      extended by SpanCell
All Implemented Interfaces:
JspTag, SimpleTag, IFormattable, IAttributeConsumer, IBehaviorConsumer, IHtmlCore, IHtmlEvents, IHtmlI18n, INetuiTag

public class SpanCell
extends AbstractHtmlTableCell
implements IFormattable, IHtmlCore, IHtmlEvents, IHtmlI18n

Data grid cell that renders an HTML <span> tag containing the tag's value attribute. The span cell is rendered inside of an HTML table <td>. The span cell supports various nested tags including those that provide formatting via the NetUI IFormattable interface and those that augment the available attribute set via the NetUI IAttributeConsumer interface.

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


Constructor Summary
SpanCell()
           
 
Method Summary
 String getTagName()
          The name of this tag; this value is used for error reporting.
protected  CellModel internalGetCellModel()
          Implementation of AbstractCell.internalGetCellModel() that exposes the SpanCellModel which is storing state for this tag.
protected  void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput)
          Render the cell's contents.
 void setAttribute(String name, String value, String facet)
           Implementation of IAttributeConsumer interface.
 void setDir(String dir)
          Sets the dir attribute for the HTML span.
 void setLang(String lang)
          Sets the lang attribute for the HTML span.
 void setOnClick(String onClick)
          Sets the onClick JavaScript event for the HTML span.
 void setOnDblClick(String onDblClick)
          Sets the onDblClick JavaScript event for the HTML span.
 void setOnKeyDown(String onKeyDown)
          Sets the onKeyDown JavaScript event for the HTML span.
 void setOnKeyPress(String onKeyPress)
          Sets the onKeyPress JavaScript event for the HTML span.
 void setOnKeyUp(String onKeyUp)
          Sets the onKeyUp JavaScript event for the HTML span.
 void setOnMouseDown(String onMouseDown)
          Sets the onMouseDown JavaScript event for the HTML span.
 void setOnMouseMove(String onMouseMove)
          Sets the onMouseMove JavaScript event for the HTML span.
 void setOnMouseOut(String onMouseOut)
          Sets the onMouseOut JavaScript event for the HTML span.
 void setOnMouseOver(String onMouseOver)
          Sets the onMouseOver JavaScript event for the HTML span.
 void setOnMouseUp(String onMouseUp)
          Sets the onMouseUp JavaScript event for the HTML span.
 void setStyle(String style)
          Sets the style for the HTML span.
 void setStyleClass(String styleClass)
          Sets the style class for the HTML span.
 void setTagId(String tagId)
           Set the name of the tagId for the HTML span.
 void setTitle(String title)
          Sets the value of the title attribute for the HTML span.
 void setValue(Object value)
           Set the value rendered inside of the HTML span.
 
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

SpanCell

public SpanCell()
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 event for the HTML span.

Specified by:
setOnClick in interface IHtmlEvents
Parameters:
onClick - the onClick event for the HTML span.

setOnDblClick

public void setOnDblClick(String onDblClick)
Sets the onDblClick JavaScript event for the HTML span.

Specified by:
setOnDblClick in interface IHtmlEvents
Parameters:
onDblClick - the onDblClick event for the HTML span.

setOnKeyDown

public void setOnKeyDown(String onKeyDown)
Sets the onKeyDown JavaScript event for the HTML span.

Specified by:
setOnKeyDown in interface IHtmlEvents
Parameters:
onKeyDown - the onKeyDown event for the HTML span.

setOnKeyUp

public void setOnKeyUp(String onKeyUp)
Sets the onKeyUp JavaScript event for the HTML span.

Specified by:
setOnKeyUp in interface IHtmlEvents
Parameters:
onKeyUp - the onKeyUp event.

setOnKeyPress

public void setOnKeyPress(String onKeyPress)
Sets the onKeyPress JavaScript event for the HTML span.

Specified by:
setOnKeyPress in interface IHtmlEvents
Parameters:
onKeyPress - the onKeyPress event.

setOnMouseDown

public void setOnMouseDown(String onMouseDown)
Sets the onMouseDown JavaScript event for the HTML span.

Specified by:
setOnMouseDown in interface IHtmlEvents
Parameters:
onMouseDown - the onMouseDown event.

setOnMouseUp

public void setOnMouseUp(String onMouseUp)
Sets the onMouseUp JavaScript event for the HTML span.

Specified by:
setOnMouseUp in interface IHtmlEvents
Parameters:
onMouseUp - the onMouseUp event.

setOnMouseMove

public void setOnMouseMove(String onMouseMove)
Sets the onMouseMove JavaScript event for the HTML span.

Specified by:
setOnMouseMove in interface IHtmlEvents
Parameters:
onMouseMove - the onMouseMove event.

setOnMouseOut

public void setOnMouseOut(String onMouseOut)
Sets the onMouseOut JavaScript event for the HTML span.

Specified by:
setOnMouseOut in interface IHtmlEvents
Parameters:
onMouseOut - the onMouseOut event.

setOnMouseOver

public void setOnMouseOver(String onMouseOver)
Sets the onMouseOver JavaScript event for the HTML span.

Specified by:
setOnMouseOver in interface IHtmlEvents
Parameters:
onMouseOver - the onMouseOver event.

setStyle

public void setStyle(String style)
Sets the style for the HTML span.

Specified by:
setStyle in interface IHtmlCore
Parameters:
style - the html style.

setStyleClass

public void setStyleClass(String styleClass)
Sets the style class for the HTML span.

Specified by:
setStyleClass in interface IHtmlCore
Parameters:
styleClass - the html style class.

setTitle

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

Specified by:
setTitle in interface IHtmlCore
Parameters:
title -

setLang

public void setLang(String lang)
Sets the lang attribute for the HTML span.

Specified by:
setLang in interface IHtmlI18n
Parameters:
lang -

setDir

public void setDir(String dir)
Sets the dir attribute for the HTML span.

Specified by:
setDir in interface IHtmlI18n
Parameters:
dir -

setTagId

public void setTagId(String tagId)
              throws JspException

Set the name of the tagId for the HTML span. This value will have the index of the current data item in the data set appended to the tagId so that the identifiers are unique in the rendered JSP.

For example, if a data set contains {"foo", "bar", "baz"} rendered using a spanCell with a tagId "theTagId", the resulting tagId values will be {"theTagId0", "theTagId1", "theTagId2"}.

Specified by:
setTagId in interface IHtmlCore
Parameters:
tagId - the the name of the tagId for the HTML span.
Throws:
JspException

setValue

public void setValue(Object value)

Set the value rendered inside of the HTML span. This is the visible text that is displayed in the HTML rendered by this tag.


setAttribute

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

Implementation of IAttributeConsumer interface. This allows a page author to add additional attributes to the HTML rendered by this tag. The attribute facets which can be consumed include:

This tag also accepts facets supported by AbstractHtmlTableCell.setAttribute(String, String, String)

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; this value must be match one of the facets supported by the JSP tags
Throws:
JspException - thrown when the given facet String is not recognized as a valid facet name

renderDataCellContents

protected void renderDataCellContents(AbstractRenderAppender appender,
                                      String jspFragmentOutput)
Render the cell's contents. This method implements support for executing the span cell's decorator.

Specified by:
renderDataCellContents in class AbstractHtmlTableCell
Parameters:
appender - the AbstractRenderAppender used to collect the rendered output
jspFragmentOutput - the String result of having evaluated the span cell's JspFragment

internalGetCellModel

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

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