...
Code Block | ||
---|---|---|
| ||
return [ label: "Settings", //the text displayed for the link targetPage: AppPages.ENABLE_SETTINGS, //Refers to AppPages.ENABLE_SETTINGS, a predefined reference for the Enable settings page targetPageState: [ id: "183" //Specifies additional parameters for the deep link, "id" in this case. ] ] |
Example 2: Employing Links Defined in PlatformManager
Creates matrix with links to Enable where the constants are used as a value for the targetPage
parameter.
You can find the link to available constants in the isvConnection_pages
file under Administration > Configuration > System Configuration > Advanced Configuration Options.
Code Block | ||
---|---|---|
| ||
def matrix = api.newMatrix(
"Trading Program ID",
"Program Line Description",
"Program Line URL"
)
// Set column formats
matrix.setColumnFormat("Trading Program ID", FieldFormatType.LINK)
matrix.setColumnFormat("Program Line URL", FieldFormatType.LINK)
matrix.addRow([
"Trading Program ID": [
label: "Program 123",
targetPage: "isvEnableProgramLinesPage",
targetPageState: [
id: "123"
],
targetPageTarget: "new" // Opens in a new tab
],
"Program Line URL": [
label: "View Details",
targetPage: "isvEnableProgramLinePage",
targetPageState: [
id: "456"
]
]
])
return matrix
|
You can also define a prefix path parameter value in the URL:
“prefix” placeholder in isvConnection_pages
(Advanced Configuration Options):
...
Construction of the link via Groovy:
Code Block | ||
---|---|---|
| ||
controller.addLink("Earnings", AppPages.ENABLE_EARNINGS + 'WithPrefix', [
id: "183",
prefix: 'asd'
]) |
Result URI: https://uk.trading-programs.enable.com/Client/pfx-integration-dev/Deals/Deals/DealEarnings/183?prefix=asd