CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK, function(config)
{
CBXDOWNLOADMGR.requestScripts(ctcanvas.downloadProvider.getMergedArray([
"FORM_CONTAINER", "WSPACE_PREF_FORMS"]), function()
{
var fm = new ctcanvas.form.FormManager(
{
formId: "EMP_DETAILS_FORM",
});
CBXFORMCONTAINER.getWindowByFormObj(fm, "EMP_DETAILS_FORM_CONT", null);
});
});
/* Here, EMP_FORM is the workspace menu. EMP_DETAILS_FORM is launched from the menu
* by passing the form manager object.*/
//* Sample code to provide the model ID in runtime is as follows:*/
CWMH.registerHandler("EMP_FORM", CWMC.EVENT_CLICK ,function(config)
{
CBXDOWNLOADMGR.requestScripts(ctcanvas.downloadProvider.getMergedArray([
"FORM_CONTAINER", "WSPACE_PREF_FORMS"]), function()
{
var fm = new ctcanvas.form.FormManager(
{
formId: "EMP_DETAILS_FORM",
modelId: "REQ01"
});
CBXFORMCONTAINER.getWindowByFormObj(fm, "EMP_DETAILS_FORM_CONT", null);
});
}); |