public class StandardColumnConfiguration extends java.lang.Object implements ColumnConfiguration
Constructor and Description |
---|
StandardColumnConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
assembleColumnConfigForDataTables()
Assembles the javascript/datatables configurations for all the columns: this value will be used on the jsp page to
determine a number of setting for the datatables plugins.
|
java.lang.String |
assembleColumnConfigForDataTablesEditable()
Assembles the javascript/datatables configurations for all the columns: this value will be used on the jsp page to
determine a number of setting for the datatables editable plugins.
|
Column |
getColumn(java.lang.Integer columnPosition)
Returns the Column for the passed in position
|
Column |
getColumnByFieldName(java.lang.String fieldName) |
java.util.TreeMap<java.lang.Integer,Column> |
getColumnConfigMap()
Get the map of all column configurations for this table
|
int |
getColumnPositionByFieldLabel(java.lang.String fieldLabel,
boolean visibleOnly)
Returns the position of a column based on the field label.
|
int |
getColumnPositionByFieldName(java.lang.String fieldName,
boolean visibleOnly)
Returns the position of a column based on the field name.
|
java.lang.Object |
getColumnValue(java.lang.Integer columnPosition)
Returns the value for the column on the specified position
|
java.lang.String |
getJsonValuesForFormEdit()
Returns a json representation of all the values for one record, to be used in populating the form when editing a record
using the form instead of inline editing.
|
java.lang.String |
getLabelForFieldName(java.lang.String fieldName)
Gets the field label for passed in field name
|
void |
setColumn(java.lang.Integer columnPosition,
Column column)
Add column configuration for specified column position
|
public void setColumn(java.lang.Integer columnPosition, Column column)
ColumnConfiguration
setColumn
in interface ColumnConfiguration
columnPosition
- the column position to set, column 0 must be the primary key of entitypublic Column getColumn(java.lang.Integer columnPosition)
ColumnConfiguration
getColumn
in interface ColumnConfiguration
columnPosition
- the postion of the column in the datatablepublic java.lang.Object getColumnValue(java.lang.Integer columnPosition)
ColumnConfiguration
getColumnValue
in interface ColumnConfiguration
columnPosition
- the position of the column in the datatablepublic java.lang.String getLabelForFieldName(java.lang.String fieldName)
ColumnConfiguration
getLabelForFieldName
in interface ColumnConfiguration
fieldName
- name of field to get the label forpublic java.util.TreeMap<java.lang.Integer,Column> getColumnConfigMap()
ColumnConfiguration
getColumnConfigMap
in interface ColumnConfiguration
public java.lang.String assembleColumnConfigForDataTables()
ColumnConfiguration
assembleColumnConfigForDataTables
in interface ColumnConfiguration
public java.lang.String assembleColumnConfigForDataTablesEditable()
ColumnConfiguration
assembleColumnConfigForDataTablesEditable
in interface ColumnConfiguration
public int getColumnPositionByFieldName(java.lang.String fieldName, boolean visibleOnly) throws java.lang.IllegalArgumentException
ColumnConfiguration
getColumnPositionByFieldName
in interface ColumnConfiguration
fieldName
- The fieldName of the columnvisibleOnly
- True if only visible column will be taken into consideration. False if all columns will be taken in
considerationjava.lang.IllegalArgumentException
public Column getColumnByFieldName(java.lang.String fieldName)
getColumnByFieldName
in interface ColumnConfiguration
public int getColumnPositionByFieldLabel(java.lang.String fieldLabel, boolean visibleOnly) throws java.lang.IllegalArgumentException
ColumnConfiguration
getColumnPositionByFieldLabel
in interface ColumnConfiguration
fieldLabel
- The Label of the columnvisibleOnly
- True if only visible column will be taken into consideration. False if all columns will be taken in
considerationjava.lang.IllegalArgumentException
public java.lang.String getJsonValuesForFormEdit()
ColumnConfiguration
getJsonValuesForFormEdit
in interface ColumnConfiguration