Custom JavaScript, CSS, and Tokens
There will be times when you will want to integrate custom visualizations, custom CSS, or helper JavaScript into a SimpleXML dashboard. Thankfully, we have been provided a way to do so. At the very top of the dashboard/form source code, you will either see the <dashboard>
or <form>
tag. Within those tags, as attributes, is where you will declare what scripts should be included in your dashboard:
<dashboard script="my_script.js" stylesheet="my_style.css">
This allows the loading of custom scripts and CSS from the $APP_HOME/appserver/static
folder. Placing these files into that folder gives the dashboard access to them. From here, you can interact with the dashboard using jQuery, or another framework, and make it bend to your will.
Another feature of SimpleXML is the ability to manipulate tokens. Let's take, for example, the text input. Let's define it like this in the source code:
<input type="text"...