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, specified by store-type and element id.
|
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 ("sciprt: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)
fsid
- map to identify the target (e.g. {"id":42, "store":"MEDIASTORE"}).void showMessage(String text)
text
in a simple message box.text
- to show.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500