When using the Spotfire gadget in LiveDesign, it is possible to automate the opening of a Spotfire template which is bind to the current LiveReport, and to automate the page that will be active by default in the opened template.
Configuration
The following Spotfire preferences are important to automate the opening of a template:
- DefaultLibraryPath: the root directory used by the gadget
- GadgetAutoLoadTemplate: whether the automatic opening of templates is allowed or not
The following document property is important to automate the opening of a page:
- LDConnectorDefaultPageTitle: the name of the page that will be opened when opening a template in the gadget (if exists)
Open template from library
A template can be automatically opened from the gadget when:
- the gadget loads for the first time in LiveDesign
- the user changed the current LiveReport and clicked on check template
A template can be automatically opened from the gadget if:
- the preference GadgetAutoLoadTemplate is set to True
- the template is saved according to the library structure convention
- the template is the only one available in its folder accoring to the automatic opening convention:
- If only one template exists under
Project N/LiveReport Y
, it will be open - If the project folder exists but contains no folder for the current LiveReport and only one template exists under
Project N
, it will be open - If the project folder does not exist, but a folder named
Project 0
exists and only one template exists underProject 0
, it will be open
If one of these conditions is not fulfilled, the template picker will open and the user will need to manually select the template to open.
- If only one template exists under
Example:
To automatically open the template associated to the LiveReport L
with id 12
of the project P
with id 1
with the preference DefaultLibraryPath set to LDConnector
:
- Click on Save from the LiveDesign Connector home page
- Check that LiveReport is
L
and Projects isP
- Select LiveReport as template accessibility
- Check that the library path is
LDConnector/Project 1/LiveReport 12/<template name>
- Click on Save
- Ensure that there is no other template at the same location
Open page in template
If you want to specify a default page in a document for it to be opened automatically in Spotfire, the document has to contain the document property LDConnectorDefaultPageTitle with a value set and a page named with this value.
Example:
If your template contains a page named First Page
which should be opened first when loading your template in the gadget, set the document property LDConnectorDefaultPageTitle to First Page
and save your template.