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

com.sas.servlet.tbeans.tableview.html.TableViewComposite
All Implemented Interfaces:
HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, RenderableInterface, TableViewCompositeKeysInterface, TableViewCompositeStyleKeysInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

public class TableViewComposite
implements TableViewCompositeKeysInterface, TableViewCompositeStyleKeysInterface

TableViewComposite is a TransformationBean™ that is composed of other TransformationBeans™ that include the following sub-components: MenuBar, NavigationBar, TableView, Title and Footer.

The TableViewComposite is one of several TransformationBeans™ that are considered composite components. A composite component allows a developer to design custom components that are made up of a combination of other components, such as TextEntry, ListBox, and Label TransformationBeans™. The visual layout of a composite component can be easily controlled through a template. For more information on composite TransformationBeans™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Composite TransformationBeans™ as well as the TransformationBean™ Component and Style Reference.

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

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:TableViewComposite custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sas.servlet.tbeans.tableview.html.TableViewCompositeKeysInterface
TABLEVIEW_APPLIEDFILTERS, TABLEVIEW_COLUMN_NAVIGATIONBAR, TABLEVIEW_FOOTER, TABLEVIEW_MENUBAR, TABLEVIEW_ROW_NAVIGATIONBAR, TABLEVIEW_TABLEDATA, TABLEVIEW_TITLE
 
Fields inherited from interface com.sas.servlet.tbeans.tableview.html.TableViewCompositeStyleKeysInterface
TABLEVIEW_CONTAINER_STYLE, TABLEVIEW_CONTENT_STYLE, TABLEVIEW_FOOTER_STYLE, TABLEVIEW_TITLE_STYLE, TABLEVIEW_TOOLBAR_STYLE
 
Constructor Summary
TableViewComposite()
          Constructs a new default TableViewComposite with a null data model.
TableViewComposite(int numRows, int numColumns)
          Constructs a TableViewComposite with numRows and numColumns of empty cells using DefaultTableModel.
TableViewComposite(java.lang.Object[][] rowData, java.lang.Object[] columnNames)
          Constructs a TableViewComposite whose data model will be constructed from the two dimensional array, rowData, with column names, columnNames.
TableViewComposite(javax.swing.table.TableModel tableModel)
          Constructs a TableViewComposite that is initialized with a tableModel as the data model.
TableViewComposite(javax.swing.table.TableModel tableModel, TableColumnModel columnModel)
          Constructs a TableViewComposite that is initialized with tableModel as the data model.
TableViewComposite(javax.swing.table.TableModel tm, TableColumnModel cm, TableRowModel rm)
          Constructs a TableViewComposite that is initialized with tableModel as the data model.
TableViewComposite(java.util.Vector rowData, java.util.Vector columnNames)
          Constructs a TableViewComposite whose data model will be constructed from the values in the Vector of Vectors, rowData, with column names, columnNames.
 
Method Summary
protected  AppliedFilters getDefaultAppliedFilters()
          Returns the default AppliedFilters object for the TableViewComposite.
 javax.swing.table.TableModel getModel()
          Return the data model for the TableViewComposite.
 void setModel(javax.swing.table.TableModel tableModel)
          Sets the data model for the TableViewComposite.
protected  void writeContent(java.io.PrintWriter out)
          Writes the transformation's main content which is everything except for the following:
Opening container html element.
 
Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
applyTemplate, applyTemplate, getActionProvider, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setActionProvider, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, writeTemplate
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, 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
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
getRequest
 

Constructor Detail

TableViewComposite

public TableViewComposite()
Constructs a new default TableViewComposite with a null data model.


TableViewComposite

public TableViewComposite(javax.swing.table.TableModel tableModel)
Constructs a TableViewComposite that is initialized with a tableModel as the data model.

Parameters:
tableModel - the data model

TableViewComposite

public TableViewComposite(javax.swing.table.TableModel tableModel,
                          TableColumnModel columnModel)
Constructs a TableViewComposite that is initialized with tableModel as the data model. It also initializes the columnModel on the TableView component.

Parameters:
tableModel - the data model
columnModel - the column model for the table

TableViewComposite

public TableViewComposite(javax.swing.table.TableModel tm,
                          TableColumnModel cm,
                          TableRowModel rm)
Constructs a TableViewComposite that is initialized with tableModel as the data model. It also initializes the columnModel and rowModel as the column and row model for the TableView component. The autoCreateColumnsFromModel flag on the TableView component is set to false if column model passed in is non-null, otherwise it is set to true and the column model for the TableView component is populated with suitable TableColumns for the columns in the data model.

Parameters:
tableModel - the data model
columnModel - the column model for the table
rowModel - the row model for the table

TableViewComposite

public TableViewComposite(int numRows,
                          int numColumns)
Constructs a TableViewComposite with numRows and numColumns of empty cells using DefaultTableModel. The instance of the DefaultTableModel will be used as the model.

Parameters:
numRows - the number of rows in the data model
numColumns - the number of columns in the data model
See Also:
DefaultTableModel

TableViewComposite

public TableViewComposite(java.lang.Object[][] rowData,
                          java.lang.Object[] columnNames)
Constructs a TableViewComposite whose data model will be constructed from the two dimensional array, rowData, with column names, columnNames. rowData is an array of rows, so the value of the cell at row 1, column 5 can be obtained with the following code:

 rowData[1][5]; 

All rows must be of the same length as columnNames.

Parameters:
rowData - the data for the new data model
columnNames - names of each column

TableViewComposite

public TableViewComposite(java.util.Vector rowData,
                          java.util.Vector columnNames)
Constructs a TableViewComposite whose data model will be constructed from the values in the Vector of Vectors, rowData, with column names, columnNames. The Vectors contained in rowData should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code:

((Vector)rowData.elementAt(1)).elementAt(5);

Each row must contain a value for each column or an exception will be raised.

Parameters:
rowData - the data for the data model
columnNames - names of each column
Method Detail

getDefaultAppliedFilters

protected AppliedFilters getDefaultAppliedFilters()
Returns the default AppliedFilters object for the TableViewComposite.

Returns:
the default AppliedFilters object for the TableViewComposite

getModel

public javax.swing.table.TableModel getModel()
Return the data model for the TableViewComposite.

Returns:
the data model for the TableViewComposite

setModel

public void setModel(javax.swing.table.TableModel tableModel)
Sets the data model for the TableViewComposite. It also sets the model on the underlying TableView and MenuBar used by the TableViewComposite.

Parameters:
tableModel - the data model for the TableViewComposite

writeContent

protected void writeContent(java.io.PrintWriter out)
                     throws java.io.IOException
Description copied from class: BaseCompositeTransformation2
Writes the transformation's main content which is everything except for the following:

Specified by:
writeContent in class com.sas.servlet.tbeans.BaseCompositeTransformation2
Throws:
java.io.IOException
See Also:
BaseCompositeTransformation2.write(PrintWriter)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.