com.sas.servlet.tbeans.tableview.html
Class CellContentsRowSelectionRenderer

com.sas.servlet.tbeans.tableview.html.CellContentsRowSelectionRenderer
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, ComplexStyleInterface, FormElementModificationEventInterface, CheckBoxStyleKeysInterface, com.sas.servlet.tbeans.form.JavaScriptObjectCreationInterface, com.sas.servlet.tbeans.JavaScriptEventHandlerInterface, RenderableInterface, TableCellContentsRenderer, TransformationInterface, GenericValidatorInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class CellContentsRowSelectionRenderer
implements TableCellContentsRenderer

The CellContentsRowSelectionRenderer is a TransformationBean™ that generates the appropriate HTML 4.0 to represent the contents of a cell as an HTML check box.

This class generates the contents of the cell containing the checkboxes used in row selection for the TableView. The checkboxes that are rendered given a name of the format TableView.getName()+"_SELECTION_"+TableView.getCurrentRowNumber().

Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.servlet.tbeans.form.BaseFormElement
RB_KEY
 
Fields inherited from interface com.sas.servlet.tbeans.form.html.CheckBoxStyleKeysInterface
CHECKBOX_BOX, CHECKBOX_LABEL, CHECKBOX_LABEL_SPACING
 
Constructor Summary
CellContentsRowSelectionRenderer()
          Default constructor
 
Method Summary
 ActionList getActions()
          Gets the list of valid actions for this cell.
 TransformationInterface getCellContentsRendererComponent(AbstractBaseTableView viewer, java.lang.Object value, ActionList actions)
          Returns the tbean used for rendering the contents of the tableview's cell.
 AbstractBaseTableView getTableView()
          Gets the instance of the AbstractBaseTableView containing this cell.
 void setActions(ActionList actions)
          Sets the list of valid actions for this cell.
 void setTableView(AbstractBaseTableView viewer)
          Sets the instance of the AbstractBaseTableView containing this cell.
 void write(java.io.PrintWriter out)
          Writes the contents of the cell as an checkbox.
 
Methods inherited from class com.sas.servlet.tbeans.form.html.CheckBox
getStyleMap, getUncheckedValue, getUncheckValue, isSubmitUncheckedValue, setSubmitUncheckedValue, setUncheckedValue
 
Methods inherited from class com.sas.servlet.tbeans.form.BaseCheckBox
getSelected, getText, getValue, isLabelBolding, setLabelBolding, setSelected, setText, setValue
 
Methods inherited from class com.sas.servlet.tbeans.form.BaseFormElement
getAccessKey, getErrorHandler, getModificationEventName, getName, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyleInfo, getTabIndex, getTitle, getValidationFunctions, getValidator, isEnabled, isValid, isValidationEnabled, setAccessKey, setEnabled, setErrorHandler, setId, setModificationEventName, setName, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyleInfo, setTabIndex, setTitle, setValidator, writeJavaScriptObject, writeJavaScriptObjectValidate, writeJavaScriptValidatorObject, writeValidationScript
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setInputTransform, setLocale, setLocaleDependentProperties, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface
getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, isVisible, setCustomAttributes, setDescription, setId, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write
 

Constructor Detail

CellContentsRowSelectionRenderer

public CellContentsRowSelectionRenderer()
Default constructor

Method Detail

getCellContentsRendererComponent

public TransformationInterface getCellContentsRendererComponent(AbstractBaseTableView viewer,
                                                                java.lang.Object value,
                                                                ActionList actions)
Returns the tbean used for rendering the contents of the tableview's cell. This method is used to configure the contents renderer appropriately before writing out the component. The name of this contents renderer will be of the form TableView.getName()+"_SELECTION_"+TableView.getCurrentRowNumber().

Specified by:
getCellContentsRendererComponent in interface TableCellContentsRenderer
Parameters:
viewer - the instance of the tableview being written.
value - the value to display as the cell's contents
actions - an actionlist of all the valid actions for this cell
Returns:
the contents renderer for this cell

setActions

public void setActions(ActionList actions)
Sets the list of valid actions for this cell.

Specified by:
setActions in interface TableCellContentsRenderer
Parameters:
actions - an actionlist of all the valid actions for this cell

getActions

public ActionList getActions()
Gets the list of valid actions for this cell.

Specified by:
getActions in interface TableCellContentsRenderer
Returns:
the actionlist of all the valid actions for this cell, or null if not set

setTableView

public void setTableView(AbstractBaseTableView viewer)
Sets the instance of the AbstractBaseTableView containing this cell.

Specified by:
setTableView in interface TableCellContentsRenderer
Parameters:
tableview - an instance of AbstractBaseTableView containing this cell

getTableView

public AbstractBaseTableView getTableView()
Gets the instance of the AbstractBaseTableView containing this cell.

Specified by:
getTableView in interface TableCellContentsRenderer
Returns:
the tableview containing this cell

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Writes the contents of the cell as an checkbox.

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class CheckBox
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.