public class ResultMatrix extends Object implements ComplexCalculationResult, Serializable
Modifier and Type | Class and Description |
---|---|
class |
ResultMatrix.AbstractResultMatrixCell |
class |
ResultMatrix.ResultMatrixImageCell |
class |
ResultMatrix.ResultMatrixLinkCell |
class |
ResultMatrix.ResultMatrixOnRowSelection |
class |
ResultMatrix.ResultMatrixStyledCell |
Constructor and Description |
---|
ResultMatrix() |
ResultMatrix(Collection<String> columns)
Creates a new matrix object with an initial set of columns
|
ResultMatrix(Map jsonMap) |
ResultMatrix(String... columns)
Creates a new matrix object with an initial set of columns
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn(String column)
Adds a column to the existing set of columns
|
void |
addColumns(Collection<String> columns)
Adds columns to the existing set of columns
|
void |
addRow(List<Object> row)
Adds a data row.
|
void |
addRow(Map<String,Object> row)
Adds a data row.
|
void |
addRow(Object... values)
Adds a data row.
|
Map<String,Object> |
findRow(String key,
Object value)
Retrieves a particular row based on a value check
|
Map<String,FieldFormatType> |
getColumnFormats()
Gets individual column formats (if specified)
|
List<String> |
getColumns()
Gets a list of defined columns
|
FieldFormatType |
getDefaultFormat()
Gets the default format
|
List<Map<String,Object>> |
getEntries()
Returns the current list entries as a list (=the rows) of maps (= the row content)
|
Map<String,Map<String,String>> |
getOnRowSelectEvents() |
String |
getResultType() |
ResultMatrix.ResultMatrixImageCell |
imageCell(Object value)
Creates an image cell that can then be added as row value.
|
boolean |
isEnableClientFilter() |
ResultMatrix.ResultMatrixImageCell |
libraryImage(String mainName,
String statusName) |
ResultMatrix.ResultMatrixLinkCell |
linkCell(Object value,
String targetPage,
String targetPageState) |
ResultMatrix.ResultMatrixLinkCell |
linkToPriceGrid(Object value,
long priceGridID,
Filter filter) |
ResultMatrix.ResultMatrixLinkCell |
linkToPriceList(Object value,
long priceListID,
Filter filter) |
ResultMatrix.ResultMatrixOnRowSelection |
onRowSelection()
Configures a client-side UI event.
|
void |
setColumnFormat(String column,
FieldFormatType fft)
Sets a column format for a specified column
|
void |
setDefaultFormat(FieldFormatType fft)
Sets a default column format
|
void |
setEnableClientFilter(boolean enableClientFilter) |
ResultMatrix.ResultMatrixStyledCell |
styledCell(Object value)
Creates a styled cell that can then be added as row value
|
ResultMatrix.ResultMatrixStyledCell |
styledCell(Object value,
String textColor,
String bgColor)
Creates a styled cell that can then be added as row value
|
ResultMatrix.ResultMatrixStyledCell |
styledCell(Object value,
String textColor,
String bgColor,
String weight)
Creates a styled cell that can then be added as row value
|
ResultMatrix.ResultMatrixStyledCell |
styledCell(Object value,
String textColor,
String bgColor,
String weight,
String alignment)
Creates a styled cell that can then be added as row value
|
String |
toString() |
public ResultMatrix()
public ResultMatrix(Map jsonMap)
public ResultMatrix(String... columns)
columns
- The initial set of column namespublic ResultMatrix(Collection<String> columns)
columns
- Collection of column namespublic void addColumn(String column)
column
- The columns namepublic void addColumns(Collection<String> columns)
columns
- Collection of columns namespublic void addRow(Map<String,Object> row)
row
- public void addRow(List<Object> row)
row
- Row as Listpublic void addRow(Object... values)
row
- Row as Arraypublic List<Map<String,Object>> getEntries()
public Map<String,Object> findRow(String key, Object value)
key
- The column name to search onvalue
- The value to match the row's column value topublic void setDefaultFormat(FieldFormatType fft)
fft
- public FieldFormatType getDefaultFormat()
public Map<String,FieldFormatType> getColumnFormats()
public void setColumnFormat(String column, FieldFormatType fft)
column
- The column namefft
- The formatpublic boolean isEnableClientFilter()
public void setEnableClientFilter(boolean enableClientFilter)
public ResultMatrix.ResultMatrixStyledCell styledCell(Object value)
value
- The value of the cellpublic ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor)
value
- The value of the celltextColor
- The text color of the cellbgColor
- The background color of the cell (HTML hex value)public ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor, String weight)
value
- The value of the celltextColor
- The text color of the cellbgColor
- The background color of the cell (HTML hex value)weight
- The font weightpublic ResultMatrix.ResultMatrixStyledCell styledCell(Object value, String textColor, String bgColor, String weight, String alignment)
value
- The value of the celltextColor
- The text color of the cellbgColor
- The background color of the cell (HTML hex value)weight
- The font weightalignment
- Cell alignement value (valid CSS)public ResultMatrix.ResultMatrixImageCell imageCell(Object value)
value
- The image URLpublic ResultMatrix.ResultMatrixImageCell libraryImage(String mainName, String statusName)
public ResultMatrix.ResultMatrixLinkCell linkToPriceGrid(Object value, long priceGridID, Filter filter)
public ResultMatrix.ResultMatrixLinkCell linkToPriceList(Object value, long priceListID, Filter filter)
public ResultMatrix.ResultMatrixLinkCell linkCell(Object value, String targetPage, String targetPageState)
public ResultMatrix.ResultMatrixOnRowSelection onRowSelection()
matrix.onRowSelection().triggerEvent(api.dashboardWideEvent("CustomerIdChanged-ED")).withColValueAsEventDataAttr("CustomerID", "customerId")The embedded dashboard that receives the event could then look like:
return api.dashboard("EmbeddedDashboard") // Here the user can assign values to the embedded // dashboard inputs common to all three modes .setParam("Customer Id", api.input("Customer Id")) .setParam("Year", api.input("Year")) // Show the dashboard embedded ... .showEmbedded() // ... and reevaluate it on "CustomerIdChanged-ED" // Note: "dashboardWideEvent()" fce makes the event local // to the containing dashboard instance .andRecalculateOn(api.dashboardWideEvent("CustomerIdChanged-ED")) // Pull the "customerId" attribute out of the event payload and expose it // as the "Customer Id" input to the embedded dashboard .withEventDataAttr("customerId").asParam("Customer Id")
public String getResultType()
getResultType
in interface ComplexCalculationResult
Copyright © 2016. All rights reserved.