public interface Common
WE_API.CommonExamples:
WE_API.Common.showMessage
("A big hello from the new FirstSpirit Web Client 5!"); // Hello World!
WE_API.Common.execute
( "script:myexample", // calls the project script "myexample" {param1:42, param2:"test"}, // an integer and a string as parameter function(result) { // callback function after the script execution is finished alert("script result: " + result); }
);
Modifier and Type | Method and Description |
---|---|
Dialog |
createDialog()
Returns an empty, yet invisible WebEdit style dialog.
|
void |
execute(String identifier,
JavaScriptObject params,
JavaScriptObject callback)
Executes a project script or an executable.
|
FSID |
getPreviewElement()
Returns current visible element.
|
void |
jumpTo(FSID fsid)
Jumps to the given target
fsid . |
void |
jumpTo(JavaScriptObject fsid)
Jumps to the given target.
|
void |
showMessage(String text)
Shows the given
text in a simple message box. |
Dialog createDialog()
Dialog.show()
FSID getPreviewElement()
void execute(@NotNull String identifier, JavaScriptObject params, JavaScriptObject callback)
identifier
- script ("script:script_uid"
) or executable ("class:full.qualified.executable.ClassName"
).params
- js object with parameters (e.g. {"param1":42, "param2":"text"}
).callback
- single-parameter function that is called with the script result.void jumpTo(FSID fsid)
fsid
.fsid
- target element.void jumpTo(JavaScriptObject fsid)
Jumps to the given target. The given attribute object specifies the target element.
The values of '', '', '' and '' are expected to be the unique ID of the related IDProvider. The UID is not supported at this point.
fsid
- attributes object to identify the target element.void showMessage(String text)
text
in a simple message box.text
- to show.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408