<< Previous in series
This is a follow up post where I emphasized with examples on the need of including jQuery into a Siebel SI implementation. So, let’s get started
Before we can start we need to get the jQuery files. It is actua
lly just one file available in two version:
- Full Version: The normal js file that you read and edit. This is usually not used in production as it is bigger in size.
- Min Version: This is the minified version of the same with line breaks and spaces removed to reduce the size.
You can download the js file from jQuery website or you can directly reference to the CDN hosted version Google or Microsoft of the jQuery . I will explain the steps for both but I would recommend going for CDN hosted version as they faster and many time already present on users system therefore not downloaded again. You will have to download jQuery plug-in JS files and include them in your application so understanding both approaches is important.
Identifying the Web Template
You will need to identify the root web template of your application so that jQuery is available throughout the application. Follow the steps below to find the web template file.
- Query your Application record and copy the value of the Field: “Container Web Page”
- Go to Web Page Object and query Container web page you just noted in the above step
- Copy the value of the field “Web Template”
- Go to the Web Template object and query with the web template name you copied in last step
- Go to Web Template file object and copy the value in the Field “Filename”
This is the name of the SWT file that you will have to edit in order to include jQuery in your application.
Editing the Web Template
Follow the steps below to edit the web template file and include jQuery.
- Go to your Siebel installation\Client\WEBTEMPL folder
- Search for your swt file you found earlier (in this example it is “dCCPageContainer_Frames.swt”)
- Open this SWT file in an editor (Notepad or WordPad)
- Steps to include Downloaded version
- Copy the jQuery JS file in Siebel Client\PUBLIC\enu\XXXXX\SCRIPTS folder
*(XXXXX is placeholder) The name of the folder will depend on your application. Usually the name is numerical such as 21219 or 21111
- Add the following line of code in head section :
- Steps to include CDN Hosted version
- Google has both https and http URL for jquery you can use any of them. Usually for security purposes you will end up using https path
- Add following code in the head section :
That’s it you are done. Now you have access to jQuery throughout the application.
*Note: You might need to include jQuery reference multiple times in case if you are using frames for your application and you will also have to include it for popup applets. In next post I am going to explain how to reference and use jQuery to achieve various functionalities.
<< Previous in series