cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1053
Views
0
Helpful
4
Replies

External JS Libraries usage

Hi,

Is it possible to use external JS libraries such as ext-js, jQuery in the portal? This will be useful to have a better UI features.

If it is possible, any idea - where should I keep the files?

1 Accepted Solution

Accepted Solutions

sotoh
Level 1
Level 1

Yes, it is definitely possible to use JS libraries such as extJS and jQuery in the portlets that you develop.  Note that extJS is already shipped with Prime Service Catalog, and is used in many parts of the application.  You can refer to extJS without doing any script inclusion.

If you need to use JS libraries that are not shipped as part of the product, the best practice is to put it into the custom directory on the server.  On Windows, you can create a directory such as

C:\CiscoPrimeServiceCatalog\jboss-as-7.1.1.Final\RequestCenterServer\deployments\RequestCenter.war\custom\my_js_lib.

In your JavaScript portlet, you will add a line like the following

.  Alternative, you can reference a CDN, e.g. .  If you are doing the latter, do make sure your application server can access the internet, and the http/https protocol matches your app configuration.

View solution in original post

4 Replies 4

sotoh
Level 1
Level 1

Yes, it is definitely possible to use JS libraries such as extJS and jQuery in the portlets that you develop.  Note that extJS is already shipped with Prime Service Catalog, and is used in many parts of the application.  You can refer to extJS without doing any script inclusion.

If you need to use JS libraries that are not shipped as part of the product, the best practice is to put it into the custom directory on the server.  On Windows, you can create a directory such as

C:\CiscoPrimeServiceCatalog\jboss-as-7.1.1.Final\RequestCenterServer\deployments\RequestCenter.war\custom\my_js_lib.

In your JavaScript portlet, you will add a line like the following

.  Alternative, you can reference a CDN, e.g. .  If you are doing the latter, do make sure your application server can access the internet, and the http/https protocol matches your app configuration.

Thanks a lot! This really helps

I have one more clarification related to this..

If I do not have any custom portlets and I am using the 'Service Designer' module alone for the service form design, how can I include the JS libraries?

Appreciate your help! Thanks.

You could attch JS functions to a service form or fields on a service form.  These JS functions in turn can load custom JS libraries that are specified in the Scripts tab of the Service Designer module. 

We recommend against loading too many global JS libraries because each gobal JS library is loaded on every form load.  Having too many global JS libraries will negatively affect the performance of your form load.  The Service Designer documentation describes how these JS libraries can be set up against your service forms. 

http://www.cisco.com/c/dam/en/us/td/docs/net_mgmt/datacenter_mgmt/intel_auto/service_portal/v_10_0/user_guides/CiscoPrimeserviceCatalog_10_0_DesignerGuide.pdf  See page 2-90 under the heading

"Integrating ISF Code into Service Forms".

Prime-Service-Catalog-inc-js-lib.png

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: