Functions | |
double | getZoomFactor () |
void | setZoomFactor (double v) |
void | tpApiAuth (string callbackFunctionName) |
void | authorize (object config, string callbackFunctionName) |
Header, Footer | |
void | setFooterVisible (bool visible) |
void | setHeaderVisible (bool visible) |
void | showNavigation (bool visible) |
void | showConsole (bool) |
Printing | |
string | createPdfByTemplate (string templateFileName, string pdfFileName, object printTextBlocks, bool openPdf=true) |
void | setPaperSize (int paperSize) |
void | setOrientation (int orientation) |
void | setPageMargins (double L, double R, double T, double B) |
double | getPageMarginTop () |
double | getPageMarginBottom () |
double | getPageMarginLeft () |
double | getPageMarginRight () |
double | getLogicalDpi () |
URL, Page | |
void | reloadPage () |
void | loadUrl (string url) |
void | addSuffix (string suffix) |
void | resetSuffixList () |
void | clearHistory () |
void | clearHTTPCache () |
void | redirectUrl (string originalUrl, string redirectUrl) |
Progress | |
void | showProgress (object v) |
void | hideProgress () |
void | clearProgressMessage () |
void | showProgressMessage (string ) |
void | showProgressMessageLabel (string ) |
void | showProgressValue (double v) |
void | showProgressMessageConsole (string v) |
int | getProgressState () |
void | processEvents () |
void | enableInterruptJavaScriptMsg (bool enable) |
|
function |
Add a file name extension to the list of suffixes handled by calling windows desktop services when clicked instead of handling within DESITE. All documents ending with one of the file name extensions in this list are handled by calling the desktop services, i.e. using the standard application set in the operating system.
suffix | file name extension e.g. '.html' |
|
function |
Trigger a generic authorization flow.
A separate browser window will open for the login process.
If successful, authorization token data will be returned via a callback function, which must take one string parameter (JSON).
Supported authorization methods are OAuth2 and OAuth2 with PKCE.
Important note: It is not recommended to use OAuth2 without PKCE because it requires you to pass a client secret (clientIdentifierSharedKey).
This will obviously be visible in your code, so use it only for tests or if you won't share your WebForm with others!
config | Object with the following keys:
|
callbackFunctionName | Name (as a string) of the callback function. That function must take one string parameter (JSON). |
|
function |
|
function |
Clear the HTTP cache entries
|
function |
Clear progress widget text.
|
function |
Create a PDF from a html print template.
Page settings can be configured by setPapersize(), setOrientation() and setMargins(). Page settings configured by the dialog are taken into account as well.
templateFileName | Text containing the html print template |
pdfFileName | Save file name for the PDF. If empty, a file dialog to choose the save file name will be opened. |
printTextBlocks | Replaces [[printTextBlock##name]] with given key-value pairs e.g. replace [[printTextBlock##exampleTable]] and [[printTextBlock##exampleUser]] in the given print template. { exampleTable: "<table width=100%><tr><td>user</td><td>anonymous</td></tr></table>", exampleUser: "anonymous" } |
openPdf | If true, the created PDF will be opened after the creation (optional, default: true). |
|
function |
By default, the browser engine will show an interrupt message if scripts take a long time to complete.
You can enable or suppress that message with this call.
To have an effect, this must be done on page initialization (e.g. in the "onLoad" event handler).
enable | true: An interrupt message is shown if a script runs for a long period of time. false: No message is displayed, the script will run without interruption. |
|
function |
|
function |
|
function |
|
function |
|
function |
Get state of the progress widget.
|
function |
|
function |
Hide progress widget.
|
function |
Clear webpage cache and open URL.
|
inlinefunction |
Enforce the processing of the event queue.
|
inlinefunction |
Let the WebForms browser redirect a URL.
Note that this works by simple string replacement, so incomplete/partial addresses will work, and passed parameters will be preserved.
|
function |
Load start page.
|
function |
Clear the list of file name extensions handled by calling desktop services.
|
function |
|
function |
|
function |
Portrait 0 the page's height is greater than its width. Landscape 1 the page's width is greater than its height.
|
function |
Set page margins in mm.
Left, Right, Top, Bottom
|
function |
Set paper size. These values are available
|
function |
|
function |
Show/hide debug console.
|
function |
|
function |
Show progress widget.
v | Config as JSON |
Config:
"text" is for the main window content (multi-line), "label" is a single-line output above the progress bar.
|
function |
Add a message to the progress widget.
|
function |
Print to console.
|
function |
Set the progress label text (shows at the bottom, above the progress bar)
|
function |
Set value of the progress bar as a floating point number.
Value range [0,1]
|
function |
Open the Thinkproject SSO page for authorization for the tp CDE API.
The authorization workflow is asynchronous, therefore the result is reported back through a callback function.
callbackFunctionName | Name (as a string) of the callback function. That function must take one string parameter (JSON). |
authorizationMethod
for the tp CDE API: Created: Wed Oct 30 2024 09:33:04 |