net.sf.jsm.table
Class JsmTable

java.lang.Object
  extended bynet.sf.jsm.JsmObject
      extended bynet.sf.jsm.table.JsmTable

public class JsmTable
extends JsmObject

Author:
ronald ploeger

Field Summary
static Log logger
           
 
Fields inherited from class net.sf.jsm.JsmObject
attributes, id, META_DATA_NAME_PROPERTY_PATH, META_DATA_NAME_VALUE, metaData
 
Constructor Summary
JsmTable()
           
 
Method Summary
 JsmTable addAttribute(java.lang.String name, java.lang.String value)
           
 JsmTable addColumnName(java.lang.String columnName, java.lang.String columnIdx)
          Add a column name to a column index
 JsmTable addFilterConfig(java.lang.String columnIdxOrName, JsmFilterConfig filterConfig)
          Add a filter config to a column
 JsmTable addMetaData(java.lang.String name, java.lang.String value)
           
 JsmTable addPropertyPath(java.lang.String columnIdxOrName, java.lang.String propertyPath)
          Add a property path to a column.
 JsmTable addRow(JsmTr tr)
           
 JsmTable addRows(java.util.Collection rows)
           
 JsmTable addWidget(java.lang.String columnIdxOrName, JsmWidget theWidget)
          Add a widget to a column
 java.lang.String generateJavaScript()
          Calls with the parameter true
 java.lang.String generateJavaScript(boolean includeNewLines)
           
 java.lang.String getContainerId()
           
 JsmTr getHeader()
           
 java.lang.String getNoRowsToDisplayMessage()
           
 java.util.List getRows()
           
 java.lang.String getSortColumn()
           
 java.lang.String getVariableName()
           
 boolean isResizable()
           
 JsmTable removeFilterConfig(java.lang.String columnIdxOrName)
          Remove a FilterConfig
 JsmTable removePropertyPath(java.lang.String columnIdxOrName)
          Remove a PropertyPath
 JsmTable removeWidget(java.lang.String columnIdxOrName)
          Remove a widget
 JsmTable setAttributes(java.util.Map attributes)
           
 JsmTable setContainerId(java.lang.String containerId)
           
 JsmTable setHeader(JsmTr header)
           
 JsmTable setMetaData(java.util.Map metaData)
           
 void setNoRowsToDisplayMessage(java.lang.String noRowsToDisplayMessage)
           
 JsmTable setResizable(boolean resizable)
           
 JsmTable setRows(java.util.List rows)
           
 JsmTable setSortColumn(java.lang.String sortColumn)
           
 JsmTable setVariableName(java.lang.String variableName)
           
 
Methods inherited from class net.sf.jsm.JsmObject
addAttributeX, addJmsObjectStuff, addMetaDataX, escapeQuote, getAttributes, getId, getMetaData, setAttributesX, setId, setMetaDataX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static Log logger
Constructor Detail

JsmTable

public JsmTable()
Method Detail

setResizable

public JsmTable setResizable(boolean resizable)

isResizable

public boolean isResizable()

addColumnName

public JsmTable addColumnName(java.lang.String columnName,
                              java.lang.String columnIdx)
Add a column name to a column index

Parameters:
columnName -
columnIdx - Index is zero based
Returns:

addWidget

public JsmTable addWidget(java.lang.String columnIdxOrName,
                          JsmWidget theWidget)
Add a widget to a column

Parameters:
columnIdxOrName - The column index or name
theWidget - The widget
Returns:

removeWidget

public JsmTable removeWidget(java.lang.String columnIdxOrName)
Remove a widget

Parameters:
columnIdxOrName - The column index or name - if you used the name in addWidget you will have to use the name here
Returns:

addFilterConfig

public JsmTable addFilterConfig(java.lang.String columnIdxOrName,
                                JsmFilterConfig filterConfig)
Add a filter config to a column

Parameters:
columnIdxOrName -
filterConfig -
Returns:

removeFilterConfig

public JsmTable removeFilterConfig(java.lang.String columnIdxOrName)
Remove a FilterConfig

Parameters:
columnIdxOrName - The column index or name - if you used the name in addFilter you will have to use the name here
Returns:

addPropertyPath

public JsmTable addPropertyPath(java.lang.String columnIdxOrName,
                                java.lang.String propertyPath)
Add a property path to a column. The property path is used to store cell values back into JavaBeans.

Parameters:
columnIdxOrName -
propertyPath -
Returns:

removePropertyPath

public JsmTable removePropertyPath(java.lang.String columnIdxOrName)
Remove a PropertyPath

Parameters:
columnIdxOrName - The column index or name
Returns:

setAttributes

public JsmTable setAttributes(java.util.Map attributes)
Parameters:
attributes - The attributes to set.

addAttribute

public JsmTable addAttribute(java.lang.String name,
                             java.lang.String value)

setMetaData

public JsmTable setMetaData(java.util.Map metaData)

addMetaData

public JsmTable addMetaData(java.lang.String name,
                            java.lang.String value)

getContainerId

public java.lang.String getContainerId()
Returns:
Returns the containerId.

setContainerId

public JsmTable setContainerId(java.lang.String containerId)
Parameters:
containerId - The containerId to set.

getSortColumn

public java.lang.String getSortColumn()
Returns:
Returns the defaultSortColumn

setSortColumn

public JsmTable setSortColumn(java.lang.String sortColumn)

getHeader

public JsmTr getHeader()
Returns:
Returns the header.

setHeader

public JsmTable setHeader(JsmTr header)
Parameters:
header - The header to set.

getRows

public java.util.List getRows()
Returns:
Returns the rows.

setRows

public JsmTable setRows(java.util.List rows)
Parameters:
rows - The rows to set.

addRow

public JsmTable addRow(JsmTr tr)

addRows

public JsmTable addRows(java.util.Collection rows)

getVariableName

public java.lang.String getVariableName()
Returns:
Returns the variableName.

setVariableName

public JsmTable setVariableName(java.lang.String variableName)
Parameters:
variableName - The variableName to set.

getNoRowsToDisplayMessage

public java.lang.String getNoRowsToDisplayMessage()

setNoRowsToDisplayMessage

public void setNoRowsToDisplayMessage(java.lang.String noRowsToDisplayMessage)

generateJavaScript

public java.lang.String generateJavaScript()
Calls with the parameter true

Specified by:
generateJavaScript in class JsmObject

generateJavaScript

public java.lang.String generateJavaScript(boolean includeNewLines)
Parameters:
includeNewLines - If set to false will not include linebreaks and ;
Returns: