JavaScript Files
To add custom JavaScript functionalityto Windchill JCA UI or pages, perform the following steps:
1. Create a JavaScript file (extension .js or .JS) for the required functionality and add it under: WT_HOME/codebase. For example, custom.js.
You can add the JavaScript file in a custom folder within codebase, if required. The path should be mentioned accordingly in the next step.
2. Run the following command in Windchill shell:
xconfmanager --add netmarkets.presentation.jsFiles=<JS file name> -t codebase/presentation.properties -p
If the JavaScript file is added under a custom folder, you need to specify the folder name along with the file name. You can specify multiple JavaScript files using multiple --add commands.
An example is given below:
xconfmanager --add netmarkets.presentation.jsFiles=custom1.js --add netmarkets.presentation.jsFiles=ext/custom2.js -t codebase/presentation.properties -p
CSS Files
To add any custom CSS scripts to all the pages, modify the netmarkets.presentation.cssFiles property in site.xconf to have the necessary CSS files included. You can include multiple CSS files as a comma or semicolon separated list in the value. Note that order is important, and that the files will be loaded after the Windchill style sheets so they will properly override the default styles.
<Property name=" netmarkets.presentation.cssFiles"
overridable="true"
targetFile="codebase/presentation.properties"
value="mypath/mycss.css;mypath/mycss2.css"/>
Was this helpful?