Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you map the request model ID to the self-designed forms, the forms are launched in the Request Modeler container. However, Canvas provides you the option to launch the form in a custom form container or without any form container also.

  • Sample code for launching the form with the request model container
Code Block
languagejs
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK ,function(config) {
canvas.launch({formId : "EMP_DETAILS_FORM"});
}); 
/* Here, EMP_FORM is the custom workspace menu. The request model ID is mapped to the EMP_DETAILS_FORM in form designer. When the menu is clicked, the form is launched through the canvas launch API in the Request Modeler container.*/ 

The following is a sample screen shot of the form with the model container.
Image Modified 

  • Sample code for launching the form with the custom container
Code Block
languagejs
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK ,function(config) {
canvas.launch({formId : "EMP_DETAILS_FORM", containerId : "EMP_DETAILS_FORM_CONT"});
}); 
/* Here, EMP_FORM is the custom workspace menu. The request model ID is mapped to the EMP_DETAILS_FORM in form designer. When the menu is clicked, the form is launched through the canvas launch API in the custom container (EMP_DETAILS_FORM_CONT).*/ 
/* If you have not mapped the model ID to the self-designed form in form designer, the model ID can be provided at runtime. Sample code is as follows:*/ 
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK ,function(config) {
canvas.launch({formId : "EMP_DETAILS_FORM", containerId : "EMP_DETAILS_FORM_CONT", modelId:"REQ01"});
}); 


The following is a sample screen shot of the form with the custom container.
Image Modified

  • Sample code for launching the form without any container
Code Block
languagejs
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK ,function(config) {
canvas.launch({formId :"EMP_DETAILS_FORM", modContReqd: "N"});
}); 
/* Here, EMP_FORM is the custom workspace menu. The request model ID is mapped to the EMP_DETAILS_FORM in form designer. When the menu is clicked, the form is launched through the canvas launch API without any container. The parameter modContReqd: "N" has been passed to launch the form without any container.*/ 
/* If you have not mapped the model ID to the self-designed form in form designer, the model ID can be provided at runtime. Sample code is as follows:*/ 
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK, function(config) {
canvas.launch({formId :"EMP_DETAILS_FORM", modContReqd: "N", modelId: "REQ01"});
}); 


The following is a sample screen shot of the form without container.
Image Modified