- CBXFORMCONTAINER.getWindow("CONTAINER_ID", config)
Use this Canvas provides the following APIs for rendering form containers:
- getWindow
- getWindowByFormId
- getWindowByFormObj
getWindow() APIUse the getWindow API to open a blank form using the container id without any data being displayed on the form.
The syntax for this API is:
Code Block |
---|
|
CBXFORMCONTAINER.getWindow("CONTAINER_ID", config)
/*
* In this API, |
...
...
' is a mandatory parameter. This should be the container, which has the Form |
...
...
* 'config' is an optional parameter. This parameter should contain the configuration of the container.
*/ |
Sample code is as follows:
Code Block |
---|
|
CBXFORMCONTAINER.getWindow("CONTAINER_EVE_TYPE_MASTER"); |
- CBXFORMCONTAINER.getWindowByFormId("FORM_ID","CONTAINER_ID",modelData, configObj)
...
Anchor |
---|
| getWindowByFormId |
---|
| getWindowByFormId |
---|
|
getWindowByFormId() APIUse the getWindowByFormId API to open a form using the container id ID and form id ID with data, when a the same form has multiple containers.
The syntax for this API is:
Code Block |
---|
|
CBXFORMCONTAINER.getWindowByFormId("FORM_ID","CONTAINER_ID",modelData, configObj)
/*
* In this API, |
...
...
' is a mandatory parameter. This should be the form |
...
...
the containers configured for it. |
...
...
' is a mandatory parameter. This should be the container, |
...
...
...
* 'modelData' is an optional parameter. This should be the array of data values to set on the Form Items.
* 'config' is an optional parameter. This parameter contains the configuration of the container; in addition to it,
* this object also contains the isTxnHdrReqd flag and the Transaction Header form to handle the transaction data flow.
*/ |
Sample code is as follows:
Code Block |
---|
|
CBXFORMCONTAINER.getWindowByFormId("UPDATE_PREF_FORM", "UPDATE_PREF_FORM_CONTAINER", null,null) |
...
- CBXFORMCONTAINER.getWindowByFormObj(formObj, "CONTAINER_ID", configObj)
...
Anchor |
---|
| getWindowByFormObj |
---|
| getWindowByFormObj |
---|
|
getWindowByFormObj() API
Use the getWindowByFormObj API to open a form using the container id ID (regardless of form id ID configuration to it) and the form manager object.
The syntax for this API is:
Code Block |
---|
|
CBXFORMCONTAINER.getWindowByFormObj(formObj, "CONTAINER_ID", configObj)
/*
* In this API, |
...
* 'formObject' is a mandatory parameter. This should be the form manager object that contains the form ID, which has the containers configured for it.
* 'CONTAINER_ID' is a mandatory parameter. This should be the container, which has the same Form ID configured to it.
* 'config' is an optional parameter. This parameter contains the configuration of the container; in addition to it,
* this object also contains the isTxnHdrReqd flag and the Transaction Header form to handle the transaction data flow.
*/ |
Sample code is as follows:
Code Block |
---|
|
var eventForm = new cbx.form.FormManager(
{
formId : "ALERT_HANDLER_FORM", mode : 'edit', |
...
...
{
'EVENT_ID': eventid, 'CHECK_DUPLICATION': count_alert, |
...
...
CBXFORMCONTAINER.getWindowByFormObj(eventForm, "CONTAINER_ALERT_HANDLER", null); |