RTC Web UI extension - problem with the management of widgets
I am writing an RTC v4.0 plugin that contributes a new page to the Web UI. I have managed to write the widget which is associated with the new RTC menu option. From this widget I want to create another widget and manage part of the UI page in this new widget. However, the concept is the same for an MVC approach which I am aiming for.
The code that creates the 2nd widget and attaches it to the 1st widget is :
var planSearchParamsPageFragment = new ITOPExportPlanSearchPageFragment();
var tpSearchParams = new dijit.TitlePane({
title:'Plan Search Parameters',
content: planSearchParamsPageFragment
});
this.titlePaneSearchParams.appendChild(tpSearchParams.domNode);
When I deploy this code to the server, I get the following error:
The code that creates the 2nd widget and attaches it to the 1st widget is :
var planSearchParamsPageFragment = new ITOPExportPlanSearchPageFragment();
var tpSearchParams = new dijit.TitlePane({
title:'Plan Search Parameters',
content: planSearchParamsPageFragment
});
this.titlePaneSearchParams.appendChild(tpSearchParams.domNode);
When I deploy this code to the server, I get the following error:
Error!ITOP Export could not be loaded due to a syntax error or missing dependency.
Page ID: itsm2.rtcext.itop.export.web.ITOPExportPage
My question is : what is the correct way of creating widgets programmatically that is accepted by RTC?
Thank you.
One answer
Hello Dan,
as per investigation performed under Investigate RTC Web UI extension plugin throws IllegalArgumentException error (318392)
it looks like a misplaced (function () { statement in ITOPExportPlanSearchPageFragment.js
is causing the issue.
Correcting the syntax should fix your issue
Eric