public class DashboardController extends Object implements Serializable, ComplexCalculationResult
| Modifier and Type | Class and Description |
|---|---|
class |
DashboardController.ControllerItem |
static class |
DashboardController.ControllerItemType |
| Constructor and Description |
|---|
DashboardController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBackendCall(String label,
String apiUrl)
Performs a backend call in the user's context (i.e.
|
void |
addBackendCall(String label,
String apiUrl,
String payload)
Performs a backend call in the user's context (i.e.
|
void |
addBackendCall(String label,
String apiUrl,
String payload,
String successMessage,
String failMessage)
Performs a backend call in the user's context (i.e.
|
void |
addButton(String label,
String targetPage)
Adds a button to the controller
|
void |
addButton(String label,
String targetPage,
Object targetPageState)
Adds a button to the controller
|
void |
addButton(String label,
String targetPage,
Object targetPageState,
Object componentId)
Adds a button to the controller
|
void |
addDownloadButton(String label,
String url)
Performs a backend call in the user's context in new window.
|
void |
addDownloadButton(String label,
String url,
String payload)
Performs a backend call in the user's context in new window.
|
void |
addHTML(String html)
Adds a HTML snippet into the controller
|
List<DashboardController.ControllerItem> |
getItems() |
String |
getResultType() |
public String getResultType()
getResultType in interface ComplexCalculationResultpublic List<DashboardController.ControllerItem> getItems()
public void addButton(String label, String targetPage)
Example:
def controller = api.newController()
controller.addButton("1. STEP: Go to Live Price Grids", "priceGridPage")
label - The label of the buttontargetPage - The name of the target page. Hint: This is also displayed in the URL after the hash symbolpublic void addButton(String label, String targetPage, Object targetPageState)
Example:
def controller = api.newController()
controller.addButton("2. STEP: Go to LPG ABC", "priceGridPage", "45.PG")
label - The label of the buttontargetPage - The name of the target page. Hint: This is also displayed in the URL after the hash symboltargetPageState - A extra parameter that is used for deep links. E.g. a typed id to open a specific pagepublic void addButton(String label, String targetPage, Object targetPageState, Object componentId)
Example:
def controller = api.newController()
controller.addButton("Open Dashboard", "dashboardPage", null, "FirstDash")
label - The label of the buttontargetPage - The name of the target page. Hint: This is also displayed in the URL after the hash symboltargetPageState - A extra parameter that is used for deep links. E.g. a typed id to open a specific pagecomponentId - Some UI actions require a parameter in this field (e.g. opening a specific dashboard)public void addBackendCall(String label, String apiUrl)
Example:
def controller = api.newController()
controller.addBackendCall("Calculate LPG", "/pricegridmanager.calculate/45")
label - The label of the buttonapiUrl - The URL to callpublic void addBackendCall(String label, String apiUrl, String payload)
label - The label of the buttonapiUrl - The URL to callpayload - The POST data to send along with the requestpublic void addBackendCall(String label, String apiUrl, String payload, String successMessage, String failMessage)
Example:
def controller = api.newController()
controller.addBackendCall("Calculate LPG", "/pricegridmanager.calculate/45", null, "OK", "Not OK")
label - The label of the buttonapiUrl - The URL to callpayload - The POST data to send along with the requestsuccessMessage - A text that should be displayed in case of a successful response from the backendfailMessage - A text that should be displayed in case of a error response from the backendpublic void addHTML(String html)
Example:
def controller = api.newController() controller.addHTML("<h2>Welcome to Price f(x)</h2>")
html - The html snippetpublic void addDownloadButton(String label, String url)
label - The label of the buttonurl - The URL to callpublic void addDownloadButton(String label, String url, String payload)
label - The label of the buttonurl - The URL to callpayload - The POST data to send along with the requestCopyright © 2019. All rights reserved.