Servoy Properties Summary | |
---|---|
String | build |
Date | buildDate |
String | component |
String | licensee |
String | typeLicensed |
Number | version |
String | versionLicensed |
Servoy Methods Summary | |
---|---|
IWDocument | createDocument( ) |
IWDocument | createDocument( String ) |
IWDocument | openDocument( String ) |
Boolean | register( String ) |
Servoy Properties Details |
---|
build
String build
Returns the current version (major, minor, build)Returns
String build String
Supported Clients
SmartClient, WebClient, NGClient
buildDate
Date buildDate
Returns date release dateReturns
Date date Date
Supported Clients
SmartClient, WebClient, NGClient
component
String component
Returns the component nameReturns
String name String
Supported Clients
SmartClient, WebClient, NGClient
licensee
String licensee
Returns the licenseeReturns
String licensee String
Supported Clients
SmartClient, WebClient, NGClient
typeLicensed
String typeLicensed
Returns the type that is valid for this licenseReturns
String type String
Supported Clients
SmartClient, WebClient, NGClient
version
Number version
Returns the current version (major, minor)Returns
Number version Double
Supported Clients
SmartClient, WebClient, NGClient
versionLicensed
String versionLicensed
Returns the version that is valid for this licenseReturns
String license String
Supported Clients
SmartClient, WebClient, NGClient
Servoy Methods Details |
---|
createDocument
IWDocument createDocument( )
Create an empty document or use a template (locally stored).Returns
IWDocument document IWDocument
Supported Clients
SmartClient, WebClient, NGClient
Sample
// create the Word document with the selected template
plugins.it2be_word.createDocument("/path/to/template.dot");
// insert the values at the selected bookmarks
plugins.it2be_word.replaceBookmark("missing bookmark", "missing bookmark");
plugins.it2be_word.replaceBookmark("date", utils.dateFormat(new Date, i18n.getDefaultDateFormat()));
plugins.it2be_word.replaceBookmark("company_name", "IT2Be");
plugins.it2be_word.replaceBookmark("full_name", "Mr M.J.G. Trapman");
plugins.it2be_word.replaceBookmark("fax_direct", "+31 847 44 36 75");
plugins.it2be_word.replaceBookmark("salution", "Mr Customer,");
plugins.it2be_word.replaceBookmark("subject", "IT2Be Word plugin");
plugins.it2be_word.replaceBookmark("body", "The plugin helped you, when everything worked like expected, " +
"to create a document " +
"based on the selected template and the included bookmarks.\n\nI personally like it.\n\n" +
"new !tab is !tab the !tab use !tab of !tab tabs.");
// replace a bookmark within a footer
plugins.it2be_word.replaceBookmark("user_name", security.getUserName());
// when you don't want to insert/toggle when the preceding bookmark is missing use the following method
// IMPORTANT always place the method AFTER processing your bookmarks
plugins.it2be_word.ignoreMissingBookmarks();
// save the document and (optionally) close it
plugins.it2be_word.saveDocument("/path/to/document.doc", false);
// notify the user of missing bookmarks or use plugins.it2be_word.checkDocument()
plugins.it2be_word.notifyMissingBookmarks();
// IMPORTANT the processDocument method should ALWAYS be the last in your method
plugins.it2be_word.processDocument();
createDocument
IWDocument createDocument( String )
Create an empty document or use a template (locally stored).Parameters
String template the template path
Returns
IWDocument document IWDocument
Supported Clients
SmartClient, WebClient, NGClient
Sample
// create the Word document with the selected template
plugins.it2be_word.createDocument("/path/to/template.dot");
// insert the values at the selected bookmarks
plugins.it2be_word.replaceBookmark("missing bookmark", "missing bookmark");
plugins.it2be_word.replaceBookmark("date", utils.dateFormat(new Date, i18n.getDefaultDateFormat()));
plugins.it2be_word.replaceBookmark("company_name", "IT2Be");
plugins.it2be_word.replaceBookmark("full_name", "Mr M.J.G. Trapman");
plugins.it2be_word.replaceBookmark("fax_direct", "+31 847 44 36 75");
plugins.it2be_word.replaceBookmark("salution", "Mr Customer,");
plugins.it2be_word.replaceBookmark("subject", "IT2Be Word plugin");
plugins.it2be_word.replaceBookmark("body", "The plugin helped you, when everything worked like expected, " +
"to create a document " +
"based on the selected template and the included bookmarks.\n\nI personally like it.\n\n" +
"new !tab is !tab the !tab use !tab of !tab tabs.");
// replace a bookmark within a footer
plugins.it2be_word.replaceBookmark("user_name", security.getUserName());
// when you don't want to insert/toggle when the preceding bookmark is missing use the following method
// IMPORTANT always place the method AFTER processing your bookmarks
plugins.it2be_word.ignoreMissingBookmarks();
// save the document and (optionally) close it
plugins.it2be_word.saveDocument("/path/to/document.doc", false);
// notify the user of missing bookmarks or use plugins.it2be_word.checkDocument()
plugins.it2be_word.notifyMissingBookmarks();
// IMPORTANT the processDocument method should ALWAYS be the last in your method
plugins.it2be_word.processDocument();
openDocument
IWDocument openDocument( String )
Open a document based on the document path (locally stored).Parameters
String documentPath the document path
Returns
IWDocument document IWDocument
Supported Clients
SmartClient, WebClient, NGClient
register
Boolean register( String )
Register your runtime license (use the Components Manager to request your license string)Parameters
String license the license
Returns
Boolean result boolean
Supported Clients
SmartClient, WebClient, NGClient
Sample
// You have to register your plug-in(s) and beans before you start using them
// One way to do so is create an 'onOpenSolution' method and add the 'register(.)' method(s) there
plugins.it2be_word.register("Insert the license string(s) from your '*_runtime_license.txt' file here!");