Package com.ptc.mvc.components
Interface ColumnConfig
- All Superinterfaces:
ComponentConfig,PropertyConfig
- All Known Implementing Classes:
JcaColumnConfig
Describes a column for display in a table or tree
If the column is part of a
Supported API: true
Extendable: false
If the column is part of a
ConfigurableTable, the property value set in the table view will override the
property value set hereSupported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionGet the custom compare javascript function to be used during client side sort
Supported API: trueDefault value is null.intgetWidth()Gets the width, in pixels, for a column in a table.booleanWhether to sort the columns ascending
Supported API: truebooleanReturn whether the column is to be included in the backing datastore, but not be displayed to the user at all.booleanWhether the column is marked for default freeze
Supported API: truebooleanIs the column marked for secondary sort
Supported API: truebooleanIs the column marked for default sort.booleanWhether the column is dynamic
Supported API: truebooleanWhether the column should be rendered sortable.booleanWhether the column is marked to have variable height
Supported API: truevoidsetAscending(boolean ascending) Set the column sort ascending or not
Supported API: truevoidsetAutoSize(boolean autoSize) Default value is true.voidsetCompareJsFunction(String compareJsFunction) Sets the custom compare javascript function to be used during client side sort.voidsetDataStoreOnly(boolean forDataStoreOnly) Mark the column to be included in the backing datastore, but not be displayed to the user at all.voidsetDataType(String dataType) Default value is null.voidsetDefaultFreeze(boolean defaultFreeze) Mark the column for default freeze, defaults to true.voidsetDefaultSecondarySort(boolean secondarySort) Mark this column for secondary sort.voidsetDefaultSort(boolean defaultSort) Mark this column for default sort.voidsetDynamic(boolean dynamic) Mark the column as dynamic, defaults to false.voidsetExactWidth(boolean useExact) Default value is false.voidsetSortable(boolean sortable) Mark the column to be rendered sortable, defaults to true.voidsetVariableHeight(boolean variableHeight) Mark the column to have variable height to show its content properly
Supported API: truevoidsetWidth(int columnWidth) Sets the width, in pixels, for a column in a table.Methods inherited from interface com.ptc.mvc.components.ComponentConfig
addComponent, addComponents, getActionModel, getComponentMode, getComponents, getComponentType, getHelpContext, getId, getLabel, getTargetObject, getType, getTypes, removeComponent, setActionModel, setComponentMode, setComponentType, setHelpContext, setId, setLabel, setTargetObject, setType, setTypesMethods inherited from interface com.ptc.mvc.components.PropertyConfig
getCharacterEntryLimit, getCurrency, getDataUtilityId, getDateDisplayFormat, getDateInputFieldType, getDefaultValueDisplayMode, getDisplayLengthInInfoPage, getDisplayLengthInTables, getHtmlId, getInputFieldType, getInputRequired, getNeed, getNeedList, getPercent, getSelectionListStyle, getSeparatorType, getStringLengthThreshholdForMultilineInput, getTextInputColumns, getTextInputRows, includeBlankOption, isDistinguishWIPVersions, isHidden, isInfoPageLink, isRenderAllStates, isRequired, isStatusGlyph, setCharacterEntryLimit, setCurrency, setDataUtilityId, setDateDisplayFormat, setDateInputFieldType, setDefaultValueDisplayMode, setDisplayLengthInInfoPage, setDisplayLengthInTables, setDistinguishWIPVersions, setHidden, setHtmlId, setIncludeBlankOption, setInfoPageLink, setInputFieldType, setInputRequired, setNeed, setPercent, setRenderAllStates, setRequired, setSelectionListStyle, setSeparatorType, setStatusGlyph, setStringLengthThreshholdForMultilineInput, setTextInputColumns, setTextInputRows
-
Method Details
-
isAscending
boolean isAscending()Whether to sort the columns ascending
Supported API: true- Returns:
- boolean
-
setAscending
void setAscending(boolean ascending) Set the column sort ascending or not
Supported API: true- Parameters:
ascending-
-
isDefaultFreeze
boolean isDefaultFreeze()Whether the column is marked for default freeze
Supported API: true- Returns:
- boolean
-
setDefaultFreeze
void setDefaultFreeze(boolean defaultFreeze) Mark the column for default freeze, defaults to true.
Supported API: true- Parameters:
defaultFreeze-
-
isDefaultSecondarySort
boolean isDefaultSecondarySort()Is the column marked for secondary sort
Supported API: true- Returns:
- boolean
-
setDefaultSecondarySort
void setDefaultSecondarySort(boolean secondarySort) Mark this column for secondary sort. When true, the parent component will be second sorted by this column when it is rendered for the first time. Works in conjunction with defaultSort
Supported API: true- Parameters:
secondarySort-
-
isDefaultSort
boolean isDefaultSort()Is the column marked for default sort.
Supported API: true- Returns:
- boolean
-
setDefaultSort
void setDefaultSort(boolean defaultSort) Mark this column for default sort. When true, the parent component will be sorted by this column when rendered for the first time.
Supported API: true- Parameters:
secondarySort-
-
isSortable
boolean isSortable()Whether the column should be rendered sortable.
Supported API: true- Returns:
- boolean
-
setSortable
void setSortable(boolean sortable) Mark the column to be rendered sortable, defaults to true.
Supported API: true -
isDataStoreOnly
boolean isDataStoreOnly()Return whether the column is to be included in the backing datastore, but not be displayed to the user at all. This allows the column to be used in client-side operations such as sorting or filtering without being displayed to the user.
Supported API: true- Returns:
- boolean
-
setDataStoreOnly
void setDataStoreOnly(boolean forDataStoreOnly) Mark the column to be included in the backing datastore, but not be displayed to the user at all. This allows the column to be used in client-side operations such as sorting or filtering.
Note: if the table or tree is view-configurable then two recommendations apply.- First, mark this column as unavailable.
You can do this by implementing the isAttributeValidForColumnStep method and returning false for the same column id. - Second, this column should not be specified in any out of the box views.
The column will automatically be added to the datastore for all views.
- Parameters:
forDataStoreOnly- true if this column should only be included in the backing datastore.- See Also:
- First, mark this column as unavailable.
-
getWidth
int getWidth()Gets the width, in pixels, for a column in a table.
Supported API: true- Returns:
- int
-
setWidth
void setWidth(int columnWidth) Sets the width, in pixels, for a column in a table.
For editable Column with no row column width is based on column header length.
For editable Column with some rows column width is maximum of Column header length & String Length constraint.
If width is not set, It will be calculated based on row data.
Supported API: true- Parameters:
int-
-
isVariableHeight
boolean isVariableHeight()Whether the column is marked to have variable height
Supported API: true- Returns:
- boolean
-
setVariableHeight
void setVariableHeight(boolean variableHeight) Mark the column to have variable height to show its content properly
Supported API: true- Parameters:
variableHeight-
-
setCompareJsFunction
Sets the custom compare javascript function to be used during client side sort. It should be ensured that the given javascript function should be loaded before table/tree is loaded.
Supported API: true- Parameters:
compareJsFunction-
-
getCompareJsFunction
String getCompareJsFunction()Get the custom compare javascript function to be used during client side sort
Supported API: true- Returns:
- String
-
setExactWidth
void setExactWidth(boolean useExact) Default value is false. This is used to display values without truncating them. The width of the column automatically increases to match the exact width of the value being displayed, where necessary.
Setting this property should be avoided as this may impact performance.
Supported API: true- Parameters:
useExact-- See Also:
-
setAutoSize
void setAutoSize(boolean autoSize) Default value is true. If set to false, setExactWidth() will be ignored and any width explicitly set for the column using the supported methods will be used; for a column that does not have a width configured explicitly, default width will be used.
Supported API: true- Parameters:
autoSize-
-
setDataType
Default value is null. Sets data type of column to be passed to the client.
Supported API: true- Parameters:
dataType-
-
getDataType
String getDataType()Default value is null. Gets data type of column to be passed to the client.
Supported API: true- Returns:
- String
-
isDynamic
boolean isDynamic()Whether the column is dynamic
Supported API: true- Returns:
- boolean
-
setDynamic
void setDynamic(boolean dynamic) Mark the column as dynamic, defaults to false.
Supported API: true- Parameters:
dynamic-
-