new RMP_ListenerComponent()
Methods
-
getName() → {String}
-
This function returns the id as string of the widget
Returns:
- Type
- String
-
getType() → {String}
-
This function returns the type of the widget(RMP_Image, RMP_Html, RMP_Scripter, RMP_StaticTextwidget, RMP_Button, RMP_TextInput, RMP_ListBox, RMP_MultiSelectionCheckBox, RMP_RadioButton, RMP_Array, RMP_FileUpload... )
Returns:
- Type
- String
-
trigger(input, options, successCallback, failureCallback)
-
Trigger the execution of a composite API or a connector
Parameters:
Name Type Description input
object the input parameters options
object options to be used during the call successCallback
RMP_ListenerComponent~successCallback a callback function called in case of a success failureCallback
RMP_ListenerComponent~failureCallback a callback function called in case of a failure Example
function ok(P_computed){ alert(JSON.stringify(P_computed)); } function ko(P_error){ alert(JSON.stringify(P_error)); } var input = {"input_1":"value_1","input_2":"value_2"}; // input could be: var input = RMPApplication.getAllVariablesValues(); var options = {"mode":"TEST","version":"7347","asynchronous":true}; // or simply var options = {}; to execute the composite API in the mode and the version used by the current web interface id_api.trigger(input,options,ok,ko);
Type Definitions
-
failureCallback(P_error)
-
This callback is called when the listener fails
Parameters:
Name Type Description P_error
Object contains the potential error generated during the listener execution -
successCallback(P_computed)
-
This callback is called when the listener is completed
Parameters:
Name Type Description P_computed
Object contains the output of the listener