public class RichTable extends WidgetBase
Decorations implemented depend on widget implementation. Examples are sorting, paging and skinning.
templateOptions
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
RichTable() |
Modifier and Type | Method and Description |
---|---|
void |
addRowToTableData(String row)
Add row content passed from table ftl to the aaData array by converting and escaping the
content to an object (in an array of objects) in JSON format
|
protected void |
buildSortOptions(LookupView lookupView,
CollectionGroup collectionGroup)
Builds default sorting options.
|
protected void |
buildTableOptions(CollectionGroup collectionGroup)
Builds column options for sorting
|
String |
constructTableColumnOptions(int target,
boolean isSortable,
boolean isUseServerPaging,
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 |
getAaData()
Get the translated aaData array generated by calls to addRowToTableData by the ftl
|
String |
getAjaxSource()
Specifies a URL for acquiring the table data with ajax
|
String |
getCellValue(Object model,
Field field)
Get the simple value as a string that represents the field's sortable value, to be used as
val in the custom uif json data object (accessed by mDataProp option on datatables -
automated by framework) when using the forceLocalJsonData option or the CollectionGroup's
isUseServerPaging option
|
protected ConfigurationService |
getConfigurationService() |
protected String |
getDataFieldColumnOptions(int target,
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
|
String |
getGroupingOptionsJSString()
Get groupingOption
|
Set<String> |
getHiddenColumns()
Holds propertyNames for the ones meant to be hidden since columns are visible by default
|
int |
getNestedLevel()
The nestedLevel property represents how many collection tables deep this particular table is
|
Set<String> |
getSortableColumns()
Holds the propertyNames for columns that are to be sorted
|
boolean |
isDisableTableSort()
Returns true if sorting is disabled
|
boolean |
isForceAoColumnDefsOverride()
If set to true and the aoColumnDefs template option is explicitly defined in templateOptions,
those aoColumnDefs will be used for this table.
|
boolean |
isForceLocalJsonData()
If true, the table will automatically use row JSON data generated by this widget
|
boolean |
isShowExportOption()
Returns true if export option is enabled
|
void |
performFinalize(Object model,
LifecycleElement parent)
The following initialization is performed:
Initializes component options for empty table message
|
protected void |
setAaData(String aaData)
Set the translated aaData array
|
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 |
setForceAoColumnDefsOverride(boolean forceAoColumnDefsOverride)
Set forceAoColumnDefsOverride
|
void |
setForceLocalJsonData(boolean forceLocalJsonData)
Set the forceLocalJsonData flag to force this table to use generated row json data
|
void |
setGroupingOptionsJSString(String groupingOptionsJSString)
Set the groupingOptions js data.
|
void |
setHiddenColumns(Set<String> hiddenColumns)
Setter for the hidden columns set
|
void |
setNestedLevel(int nestedLevel)
Set the nestedLevel for this table - must be set if using forceLocalJsonData and this is a
subCollection of a TableCollection (also using forceLocalJsonData)
|
void |
setShowExportOption(boolean showExportOption)
Show/Hide the search and export option in tabletools
|
void |
setSortableColumns(Set<String> sortableColumns)
Setter for sortable columns
|
getComponentTypeName
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, appendToStyle, checkMutable, clone, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, afterEvaluateExpression, appendToStyle, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycle
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
public RichTable()
public void performFinalize(Object model, LifecycleElement parent)
performFinalize
in interface LifecycleElement
performFinalize
in class ComponentBase
model
- - top level object containing the dataparent
- - parent componentprotected void buildTableOptions(CollectionGroup collectionGroup)
collectionGroup
- protected void buildSortOptions(LookupView lookupView, CollectionGroup collectionGroup)
lookupView
- the view for the lookupcollectionGroup
- the collection group for the tableprotected String getDataFieldColumnOptions(int target, CollectionGroup collectionGroup, DataField field)
target
- column indexcollectionGroup
- the collectionGroup in which the data field is definedfield
- the field to construction options forpublic String constructTableColumnOptions(int target, boolean isSortable, boolean isUseServerPaging, Class<?> dataTypeClass, String sortDataType)
target
- the column indexisSortable
- whether a column should be marked as sortableisUseServerPaging
- is server side paging enabled?dataTypeClass
- the class type of the column value - used determine the sType option -
which identifies the search plugin to usesortDataType
- Defines a data source type for the sorting which can be used to read
realtime information from the tablepublic String getEmptyTableMessage()
public void setEmptyTableMessage(String emptyTableMessage)
emptyTableMessage
- public boolean isDisableTableSort()
public void setDisableTableSort(boolean disableTableSort)
disableTableSort
- the disableTableSort to setpublic boolean isShowExportOption()
public void setShowExportOption(boolean showExportOption)
showExportOption
- the showExportOptions to setpublic Set<String> getHiddenColumns()
Duplicate entries are ignored and the order of entries is not significant
public void setHiddenColumns(Set<String> hiddenColumns)
hiddenColumns
- a set containing propertyNamespublic Set<String> getSortableColumns()
Duplicate entries are ignored and the order of entries is not significant
public void setSortableColumns(Set<String> sortableColumns)
sortableColumns
- a set containing propertyNames of columns to be sortedpublic String getAjaxSource()
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
public void setAjaxSource(String ajaxSource)
ajaxSource
- public String getGroupingOptionsJSString()
public void setGroupingOptionsJSString(String groupingOptionsJSString)
groupingOptionsJSString
- public boolean isForceAoColumnDefsOverride()
public void setForceAoColumnDefsOverride(boolean forceAoColumnDefsOverride)
forceAoColumnDefsOverride
- public boolean isForceLocalJsonData()
This forces the table backed by this RichTable to get its content from a template option called aaData. This will automatically skip row generation in the template, and cause the table receive its data from the aaData template option automatically generated and set by this RichTable. This allows the table to take advantage of the bDeferRender option (also automatically set to true) when this table is a paged table (performance increase for tables that are more than one page). Note: the CollectionGroup's isUseServerPaging flag will always override this functionality if it is also true.
public void setForceLocalJsonData(boolean forceLocalJsonData)
forceLocalJsonData
- public int getNestedLevel()
This property must be manually set if the flag forceLocalJsonData is being used and the collection table this RichTable represents is a subcollection of a TABLE collection (not stacked collection). If this is true, add 1 for each level deep (ex. subCollection would be 1, sub-subCollection would be 2). If this property is not set javascript errors will occur on the page, as this determines how deep to escape certain characters.
public void setNestedLevel(int nestedLevel)
nestedLevel
- public String getAaData()
This data is in JSON format and expected to be consumed by datatables when utilizing the forceLocalJsonData option. This will be populated automatically if that flag is set to true.
protected void setAaData(String aaData)
This data is in JSON format and expected to be consumed by datatables when utilizing the forceLocalJsonData. This setter is required for copyProperties()
aaData
- the generated aaDatapublic String getCellValue(Object model, Field field)
model
- model the current modelfield
- the field to retrieve a sortable value from for use in custom json datapublic void addRowToTableData(String row)
The data in aaData is expected to be consumed by a call by the datatables plugin using sAjaxSource or aaData. The addRowToTableData generation call is additive must be made per a row in the ftl.
row
- the row of content with each cell content surrounded by the @quot@ token and
followed by a commaprotected ConfigurationService getConfigurationService()
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.