org.kuali.rice.krad.uif.widget
Class RichTable

java.lang.Object
  extended by org.kuali.rice.krad.uif.component.ConfigurableBase
      extended by org.kuali.rice.krad.uif.component.ComponentBase
          extended by org.kuali.rice.krad.uif.widget.WidgetBase
              extended by org.kuali.rice.krad.uif.widget.RichTable
All Implemented Interfaces:
Serializable, Component, Configurable, ScriptEventSupport, Widget, org.springframework.core.Ordered

public class RichTable
extends WidgetBase

Decorates a HTML Table client side with various tools

Decorations implemented depend on widget implementation. Examples are sorting, paging and skinning.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
RichTable()
           
 
Method Summary
protected  void buildTableOptions(CollectionGroup collectionGroup)
          Builds column options for sorting
protected  String constructTableColumnOptions(boolean isSortable, Class dataTypeClass, String sortDataType)
          Constructs the sort data type for each data table columns in a format that will be used to initialize the data table widget via javascript
 String getAjaxSource()
          Specifies a URL for acquiring the table data with ajax
protected  String getDataFieldColumnOptions(CollectionGroup collectionGroup, DataField field)
          Construct the column options for a data field
 String getEmptyTableMessage()
          Returns the text which is used to display text when the table is empty
 Set<String> getHiddenColumns()
          Holds propertyNames for the ones meant to be hidden since columns are visible by default
 Set<String> getSortableColumns()
          Holds the propertyNames for columns that are to be sorted
 boolean isDisableTableSort()
          Returns true if sorting is disabled
 boolean isShowSearchAndExportOptions()
          Returns true if search and export options are enabled
 void performFinalize(View view, Object model, Component component)
          The following initialization is performed: Initializes component options for empty table message
 void setAjaxSource(String ajaxSource)
          Setter for the Ajax source URL
 void setDisableTableSort(boolean disableTableSort)
          Enables/disables the table sorting
 void setEmptyTableMessage(String emptyTableMessage)
          Setter for a text to be displayed when the table is empty
 void setHiddenColumns(Set<String> hiddenColumns)
          Setter for the hidden columns set
 void setShowSearchAndExportOptions(boolean showSearchAndExportOptions)
          Show/Hide the search and export options in tabletools
 void setSortableColumns(Set<String> sortableColumns)
          Setter for sortable columns
 
Methods inherited from class org.kuali.rice.krad.uif.widget.WidgetBase
getComponentTypeName
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addDataAttribute, addStyleClass, appendToStyle, getAlign, getAllDataAttributesJs, getBaseId, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getComponentsForLifecycle, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getDataMetaAttribute, getDataRoleAttribute, getDataTypeAttribute, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAlign, setBaseId, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDataMetaAttribute, setDataRoleAttribute, setDataTypeAttribute, setDisableSessionPersistence, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.uif.component.ConfigurableBase
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addDataAttribute, addStyleClass, appendToStyle, getAllDataAttributesJs, getBaseId, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentsForLifecycle, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, isDisableSessionPersistence, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, setBaseId, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Configurable
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnLoadScript
 

Constructor Detail

RichTable

public RichTable()
Method Detail

performFinalize

public void performFinalize(View view,
                            Object model,
                            Component component)
The following initialization is performed:

Specified by:
performFinalize in interface Component
Overrides:
performFinalize in class ComponentBase
Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
component - - parent component
See Also:
Component.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

buildTableOptions

protected void buildTableOptions(CollectionGroup collectionGroup)
Builds column options for sorting

Parameters:
collectionGroup -

getDataFieldColumnOptions

protected String getDataFieldColumnOptions(CollectionGroup collectionGroup,
                                           DataField field)
Construct the column options for a data field

Parameters:
collectionGroup - - the collectionGroup in which the data field is defined
field - - the field to construction options for
Returns:
- options as valid for datatable

constructTableColumnOptions

protected String constructTableColumnOptions(boolean isSortable,
                                             Class dataTypeClass,
                                             String sortDataType)
Constructs the sort data type for each data table columns in a format that will be used to initialize the data table widget via javascript

Parameters:
isSortable - - whether a column should be marked as sortable
dataTypeClass - - the class type of the column value - used determine the sType option - which identifies the search plugin to use
sortDataType - - Defines a data source type for the sorting which can be used to read realtime information from the table
Returns:
a formatted string with data table options for one column

getEmptyTableMessage

public String getEmptyTableMessage()
Returns the text which is used to display text when the table is empty

Returns:
empty table message

setEmptyTableMessage

public void setEmptyTableMessage(String emptyTableMessage)
Setter for a text to be displayed when the table is empty

Parameters:
emptyTableMessage -

isDisableTableSort

public boolean isDisableTableSort()
Returns true if sorting is disabled

Returns:
the disableTableSort

setDisableTableSort

public void setDisableTableSort(boolean disableTableSort)
Enables/disables the table sorting

Parameters:
disableTableSort - the disableTableSort to set

isShowSearchAndExportOptions

public boolean isShowSearchAndExportOptions()
Returns true if search and export options are enabled

Returns:
the showSearchAndExportOptions

setShowSearchAndExportOptions

public void setShowSearchAndExportOptions(boolean showSearchAndExportOptions)
Show/Hide the search and export options in tabletools

Parameters:
showSearchAndExportOptions - the showSearchAndExportOptions to set

getHiddenColumns

public Set<String> getHiddenColumns()
Holds propertyNames for the ones meant to be hidden since columns are visible by default

Duplicate entries are ignored and the order of entries is not significant

Returns:
a set with propertyNames of columns to be hidden

setHiddenColumns

public void setHiddenColumns(Set<String> hiddenColumns)
Setter for the hidden columns set

Parameters:
hiddenColumns - - a set containing propertyNames

getSortableColumns

public Set<String> getSortableColumns()
Holds the propertyNames for columns that are to be sorted

Duplicate entries are ignored and the order of entries is not significant

Returns:
a set of propertyNames with for columns that will be sorted

setSortableColumns

public void setSortableColumns(Set<String> sortableColumns)
Setter for sortable columns

Parameters:
sortableColumns - - a set containing propertyNames of columns to be sorted

getAjaxSource

public String getAjaxSource()
Specifies a URL for acquiring the table data with ajax

When the ajax source URL is specified the rich table plugin will retrieve the data by invoking the URL and building the table rows from the result. This is different from the standard use of the rich table plugin with uses progressive enhancement to decorate a table that has already been rendereed

Returns:
String URL for ajax source

setAjaxSource

public void setAjaxSource(String ajaxSource)
Setter for the Ajax source URL

Parameters:
ajaxSource -


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.