It's all about the answers!

Ask a question

Extending RTC 4.0 Web UI


Dan Sevcenco (5021923) | asked May 22 '14, 1:39 p.m.
Does anyone have a working example of how to extend the RTC 4.0 Web UI with a new menu button, a page with some content and an interaction with the server side to fetch data from the repository and display it in the new page?

I have found examples written for RTC v3 but I could not make them work on RTC v4.

Thanks a lot for any information on how I can make this work.

2 answers



permanent link
Dan Sevcenco (5021923) | answered May 27 '14, 2:18 a.m.
I have managed to replicate one of the examples found online and now I tried to extend that example to include my custom UI page and have hit a wall.

The server keeps telling me in the RTC client web UI that my resource could not be loaded due to a syntax error or missing dependency.

The application log shows the following error :

2014-05-27 09:12:43,611 [              WebContainer : 3] ERROR net.jazz.ajax.servlets.StyleSheetServlet            - GET https://calm-server.taxud.ibm.com:9443/ccm/web/_style/
?exclude=D~E~F~G~H~I~J~K~L~M&include=itsm2.rtcext.itsm.web.ui.internal.page.ITOPExportPage.js&_proxyURL=%2Fccm&locale=en-usHEADER: Host = calm-server.taxud.ibm.com:9443
HEADER: User-Agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20100101 Firefox/10.0.12
HEADER: Accept = text/css,*/*;q=0.1
HEADER: Accept-Language = en-us,en;q=0.5
HEADER: Accept-Encoding = gzip, deflate
HEADER: Connection = keep-alive
HEADER: Referer = https://calm-server.taxud.ibm.com:9443/ccm/web/projects/ITSM2%20Operational%20Planning%204%20PROD%20(RTC%20v1.1)
HEADER: Cookie = net-jazz-ajax-cookie-rememberUserId=dan.sevcenco; JazzFormAuth=Form; UnicaNIODID=wYvfFVuyoos-Ync1x9S; ibmSurvey=1391165875373; LtpaToken2=pYk...g==; JSESSIONID
=000...:-1
Parameter: locale = [en-us]
Parameter: include = [itsm2.rtcext.itsm.web.ui.internal.page.ITOPExportPage.js]
Parameter: _proxyURL = [/ccm]
Parameter: exclude = [D~E~F~G~H~I~J~K~L~M]

java.lang.IllegalArgumentException: Resource does not exist: itsm2.rtcext.itsm.web.ui.internal.page.ITOPExportPage.js
        at net.jazz.ajax.model.Resource.resolve(Resource.java:241)
        at net.jazz.ajax.model.Resource.resolveAll(Resource.java:254)
        at net.jazz.ajax.servlets.AbstractResourceServlet.createOperation(AbstractResourceServlet.java:37)
        at net.jazz.ajax.servlets.AbstractResourceServlet.doGet(AbstractResourceServlet.java:47)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at net.jazz.ajax.servlets.LoggingHttpServlet.service(LoggingHttpServlet.java:34)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
        at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1227)


Obviously, there is something wrong with the setup of the mapping between the Dijit widget I have defined and the plugin descriptor but for the life of me, I cannot see it. It must be said that I am not a web developer, neither do I have extensive experience with Dojo and Dijit, so I would not be surprised if I made a stupid mistake out of lack of knowledge.

So, the question to the experts is : in such situations, where do I start with the detective work? I must put the magnifying glass somewhere on the application server and my code to start figuring it out, but where?

Any suggestions, tips, anything to help me move forward would be greatly appreciated.

Thanks!

permanent link
Dan Sevcenco (5021923) | answered May 27 '14, 8:01 a.m.
With some more fiddling I managed to get past the error above and received the following error :

============================================
Failed to load the ITOP Export page widget. Invalid template:
====================================

My javascript file looks like this:

====================================
dojo.provide("itsm2.rtcext.itop.export.web.ui.internal.page.ITOPExportPage");

dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("net.jazz.ajax.ui.PlatformUI");

(function(){

    var PlatformUI = net.jazz.ajax.ui.PlatformUI;
//    var hiCount = 0;
   
    dojo.declare("itsm2.rtcext.itop.export.web.ui.internal.page.ITOPExportPage", [dijit._Widget, dijit._Templated], {
        //templateString: "<div><div dojoAttachPoint='itopExportAttachPoint'>uninitialized</div></div>",
        templateString: dojo.cache("ui.internal.page", "templates/ITOPExportPage.html"),
       
        postCreate: function(){
            var ActionRegistry = PlatformUI.getWorkbench().getActionRegistry();
            ActionRegistry.registerAction("itsm2.rtcext.itop.export.web.openITOPExportView", this, "initializePage");
        },
       
        initializePage: function(){
            //hiCount++;
            //this.itopExportAttachPoint.removeChild(this.itopExportAttachPoint.firstChild);
            //this.itopExportAttachPoint.appendChild(document.createTextNode("Hi from Jazz!!! (" + hiCount + ")"));
        }
    });
   
})();
======================================

and the referenced HTML page only contains a TitlePane with some basic controls inside and it was created with RAD v9.1 as part of a Dojo widget I declared inside the project.

Any tips on what I could try to determine why the template is not accepted by the application?

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.