When you create a request, Request Modeler creates a menu in the specified workspace for you to access the form. The auto generated form gets launched from this menu through ctcanvas.modeler.launch API. You cannot launch the form created by you in the place of the auto generated form from this workspace menu. However, you can launch the self-designed form created by you with or without container by clicking a context menu or a button in an app, from a link or from a custom workspace menu.
The following sections pages explain the various ways to launch the form from a workspace menu as an example.
...
- Sample code for launching the form with the custom container
...
- Sample code for launching the form without any container
...
- Even if the request model ID is mapped to the self-designed form (EMP_DETAILS_FORM), you must provide the container ID in the code. If you are providing the custom container ID (EMP_DETAILS_FORM_CONT), you will have to wire the form container actions to the Request Modeler actions, if required. If you want the model container to display, then provide the model container ID.
- If the request model ID is not mapped to the self-designed form, you can provide the model ID at runtime.
...
When you launch the form by passing the form ID to CBXFORMCONTAINER.getWindowByFormId, the request model ID cannot be provided at runtime and therefore, ensure to map the request model ID to the self-designed form (EMP_DETAILS_FORM). You must provide the container ID in the code. If you are providing the custom container ID (EMP_DETAILS_FORM_CONT), you will have to wire the form container actions to the Request Modeler actions, if required. If you want the model container to display, then provide the model container ID.
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK, function(config) {
CBXDOWNLOADMGR.requestScripts(ct.downloadProvider.getMergedArray(["FORM_CONTAINER", "WSPACE_PREF_FORMS"]), function() {
CBXFORMCONTAINER.getWindowByFormId("EMP_DETAILS_FORM", "EMP_DETAILS_FORM_CONT");
});
});
/* Here, EMP_FORM is the workspace menu. EMP_DETAILS_FORM is passed as the form ID to launch it from the menu in the custom container.*/
Page Tree |
---|
...
- Sample code for launching the form with the request model container
...
|