Usescript

From JRapid

Jump to: navigation, search

The "usescript" element is used to import an external JavaScript file. It is child element of the <config>, <entity> and <panel> elements and it may be automatically created when you import a view, widget or transformer.

Usage:

<usescript
    location = LOCATION
/>
  • location: the localtion of the javascript file relative to the project root.

Example:

  • Actions of type "javascript" need to import the JavaScript file that contains the associated function.
<app>
 <config>
     ...
     <usescript location="../js/realestate.js"/>
     ...
 </config>
</app>