In order to handle the events or to enable additional actions on the record, canvas provides a variety of handlers according to the nature of the apps. Following are the events that you can use to handle the events on the app:
This handler is applicable only for different types of grid views, chart apps and tree/org apps. This event occurs when the user clicks on a cell or area on the app.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.CELL_CLICK, function( |
...
colId, colVal, record)
{
// Implementation specific code
}) |
This handler is applicable only for different types of grid views, chart apps and tree/org apps. This event occurs when the user double-clicks on a cell or area on the app.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.CELL_DBLCLICK, function( |
...
colId, colVal, record)
{
// Implementation specific code
}) |
- preferencechangePREF_CHNG
This handler is applicable only for LIST and Live Scroll Grid with Cache views. This event occurs when the user changes the preference.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.PREF_CHNG, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable only for the grid views . This event and occurs when the user right-clicks on any data or cell in the grid.
See sectionCreating a sample Context Menu for more details.
...
Code Block |
---|
|
CWEH.registerHandler("<WIDGET_ID>", CWEC.CONTEXT_CLICK, function(config)
{
// Implementation specific code
}); |
The Context Menu Handler Registry (CMHR) handles the action triggered by the context-menu event. This event occurs when the user clicks a specific option in the context-menu.
Code Block |
---|
|
CMHR.registerHandler("<MENU_ID>", function(config)
{
var rowData = config.record.data;
}); |
This is a special handler and is applicable only for column in the grid whose DRILL_DOWN_IND is marked as 'Y'. This event occurs when the user clicks on the hyper-linked data on the drill down enabled column.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.DRILL_DOWN, function(arguments) |
...
{
// Implementation specific code
}) |
- bbuttonclickBBAR_BUTTON_CLICK
This handler is applicable for all the views. This event occurs when the user clicks on the buttons, which is displayed in the app button bar.
Code Block |
---|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.BBAR_BUTTON_CLICK, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable only for ORG view. This event occurs when the user clicks on any node in the organization chart view.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.NODE_CLICK, function(arguments) |
...
{
// Implementation specific code
}) |
Info |
---|
If you are using CT 18.1, use |
...
ROW_CLICK event instead of |
...
NODE_CLICK for Org view as follows: |
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.ROW_CLICK, function(arguments) |
...
{
// Implementation specific code
} |
This handler is applicable only for ORG view. This event occurs when the user clicks on the line joining the two nodes in the organization chart view.
Code Block |
---|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.FLOW_CLICK, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable for all the views. This event occurs when the user expands or maximizes the app.
Code Block |
---|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.EXPAND, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable only for LIST, GROUP and PAGING views. The event occurs when the user selects one or more records on the grid.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.HIGHLIGHT, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable for all the views. This event occurs while initializing the view of the app.
Code Block |
---|
|
CWEH.registerHandler( |
...
"<WIDGET_ID>", CWEC.SWITCH_VIEW_CHANGE, function(arguments) |
...
{
// Implementation specific code
}) |
This handler is applicable for all the views (apps). This event occurs after the app (widget) is loaded with the data.
Code Block |
---|
|
CWEH.registerHandler("<WIDGET_ID>", CWEC.WIDGET_RENDERED, function(record)
{
// Implementation specific code
}) |