- Source:
- API-4.1.js, line 9
Methods
applyTemplateFromLibrary(webpanelurl, templatetitle, documenttitle, libraryfoldername, localfolder)
Applies a template loaded from TIBCO Spotfire Library to the current TIBCO Spotfire document.
A template is a TIBCO Spotfire document which contains a description of tables, visualisations... but does not contains data.
The current document is saved.
Parameters:
Name | Type | Description |
---|---|---|
webpanelurl |
string | The url of Discngine Web Panel to set after applying template. Left this parameter empty to avoid the Web Panel redirection. |
templatetitle |
string | The name of the template to apply. |
documenttitle |
string | The name which the document is saved into. If null, the document is not saved and modifications of the document will be saved in the template. |
libraryfoldername |
string | The name of the library folder. |
localfolder |
string | The path of a local folder where some settings are saved temporary. |
- Source:
- API-4.1.js, line 446
Throws:
If the TIBCO Spotfire Library folder cannot be reached.
Examples
applyTemplateFromLibrary('http://server/DiscngineWebpanel/', 'test_template.dxp', 'test_template_data.dxp', 'Discngine Library', 'c:/temp/'); // save the document
applyTemplateFromLibrary('http://server/DiscngineWebpanel/', 'test_template.dxp', '', 'Discngine Library', 'c:/temp/'); // do not save the document
applyTemplateFromLibrary('http://server/DiscngineWebpanel/', 'test_template.dxp', 'null', 'Discngine Library', 'c:/temp/'); // do not save the document
applyTemplateFromLibrary('http://server/DiscngineWebpanel/', 'test_template.dxp', null, 'Discngine Library', 'c:/temp/'); // do not save the document
applyTemplateFromLibrary('', 'test_template.dxp', null, 'Discngine Library', 'c:/temp/'); // do not redirect the Web Panel
applyTemplateFromLocal(webpanelurl, templatepath, documentpath)
Applies a template loaded from a path to the current TIBCO Spotfire document.
A template is a TIBCO Spotfire document which contains a description of tables, visualisations... but does not contains data.
The current document is saved.
Parameters:
Name | Type | Description |
---|---|---|
webpanelurl |
string | The path of Discngine Web Panel to set after applying template. Left this parameter empty to avoid the Web Panel redirection. |
templatepath |
string | The path of the template to apply. |
documentpath |
string | The path which the document is saved into. If null, the document is not saved and modifications of the document will be saved in the template. |
- Source:
- API-4.1.js, line 479
Examples
applyTemplateFromLocal('http://server:port/DiscngineWebpanel/', 'c:/temp/test_template.dxp', 'c:/temp/test_template_data.dxp'); // save the document
applyTemplateFromLocal('http://server:port/DiscngineWebpanel/', 'c:/temp/test_template.dxp', ''); // do not save the document
applyTemplateFromLocal('http://server:port/DiscngineWebpanel/', 'c:/temp/test_template.dxp', 'null'); // do not save the document
applyTemplateFromLocal('http://server:port/DiscngineWebpanel/', 'c:/temp/test_template.dxp', null); // do not save the document
applyTemplateFromLocal('', 'c:/temp/test_template.dxp', null); // do not redirect the Web Panel
saveTemplateToFile(webpanelurl, templatepath)
Saves the current TIBCO Spotfire document as a template in the given path.
A template is a TIBCO Spotfire document which contains a description of tables, visualisations... but does not contains data.
Parameters:
Name | Type | Description |
---|---|---|
webpanelurl |
string | The url of Discngine Web Panel to set before saving template (it will be browsed when the template is applied). Left this parameter empty to avoid the Web Panel redirection. |
templatepath |
string | The path which the template is saved into (without data). |
- Source:
- API-4.1.js, line 379
saveTemplateToLibrary(webpanelurl, templatetitle, libraryfoldername, createfolderifmissing)
Saves the current TIBCO Spotfire document as a template in the given TIBCO Spotfire Library folder.
A template is a TIBCO Spotfire document which contains a description of tables, visualisations... but does not contain data.
Parameters:
Name | Type | Description |
---|---|---|
webpanelurl |
string | The url of Discngine Web Panel to set before saving template (it will be browsed when the template is applied). Left this parameter empty to avoid the Web Panel redirection. |
templatetitle |
string | The path which the document is saved into. |
libraryfoldername |
string | The name of the TIBCO Spotfire Library folder. |
createfolderifmissing |
string | Optional boolean parameter defaulted to false, when true the function will try to create the folder if it did not exist and the user have the rights to do so. |
- Source:
- API-4.1.js, line 407
Throws:
If the TIBCO Spotfire Library folder cannot be reached.