Methods
-
<static> addListener(listener)
-
Allows to launch a function whenever a field of a web interface is modified.
Parameters:
Name Type Description listener
RMPApplication~VariableHandler -
<static> addProcessListener(listener)
-
Allows to launch a function call "processListener" whenever a process launched with RMPApplication.executeProcess
Parameters:
Name Type Description listener
RMPApplication~ProcessExecutionHandler - Deprecated:
- Yes
- See:
-
<static> debug(message)
-
Display the message in the console of the browser only if the web interface has been opened in debug mode (the url contains P_attributes=debug)
Parameters:
Name Type Description message
String -
<static> debugable(label)
-
Instrumentalize (monitor) an instance of a javascript Object in debug mode (the url of the web interface contains P_attributes=debug). An instrumentalized Object will log in the console of the browser all its accesses which means: start, end and the stackstrace of the potential exceptions.
Parameters:
Name Type Description label
String -
<static> deregisterRequiredVariable(name)
-
This function allows to set a widget as optional
Parameters:
Name Type Description name
String -
<static> executeProcess(customerId, processId, key)
-
* This function allows to launch a process from a wen interface without closing it and wait for process return thanks to RMPApplication.addProcessListener function. It has been replaced by API Listener Tab.
Parameters:
Name Type Description customerId
String processId
String key
String - Deprecated:
- Yes
- See:
-
<static> forEachWidget(visitor)
-
This function calls a javascript function for each widget of web interface.
Parameters:
Name Type Description visitor
RMPApplication~WidgetVisitor The function applied to widgets Example
function visitor(widget) { try { widget.setEnabled(true); } catch(err){ console.log(err); } } RMPWidgets.forEachWidget(visitor); -
<static> get(name) → {String}
-
Alias to RMPApplication.getVariable
Parameters:
Name Type Description name
String Returns:
- Type
- String
-
<static> getAllApplicationVariables() → {Array.<String>}
-
This function returns an array with all variable names of the current web interface
Returns:
- Type
- Array.<String>
Example
(["var1","var2","var3"]) -
<static> getAllIndexedValues(name) → {String}
-
This function returns all the values of a column of an array
("val1","val2",...) Parameters:
Name Type Description name
String Returns:
- Type
- String
-
<static> getAllVariablesValues() → {Object}
-
This function returns a Json object with all variable names/values of the current web interface
Returns:
- Type
- Object
Example
{"var1":"val1","array_var":["val1","val2","val3"]}) -
<static> getAllWidgets() → {Array.<Object>}
-
This function returns all widgets of web interface.
Returns:
- Type
- Array.<Object>
Example
var widgetList = RMPWidgets.getAllWidgets(); for( i=0 ; i< widgetList.length ; i++ ){ widgetList[i].setVisible(true); } -
<static> getAllWidgetsId() → {Array.<String>}
-
This function returns all widgets' ID of web interface.
Returns:
- Type
- Array.<String>
-
<static> getIndexedVariable(name, index) → {String}
-
This function returns the value of a widget of an array (index is a string starting at "0")
Parameters:
Name Type Description name
String index
String Returns:
- Type
- String
Example
RMPApplication.getIndexedVariable("mycol1","2") -
<static> getIndexedVariableLength(name) → {String}
-
This function returns the number of lines of an array
Parameters:
Name Type Description name
String Returns:
- Type
- String
-
<static> getInvalidWidgets() → {Array.<Object>}
-
This function returns an array that contains all the invalid widgets
Returns:
- Type
- Array.<Object>
-
<static> getList(name) → {RMP_List}
-
This function returns a RMP_List object
Parameters:
Name Type Description name
String Returns:
list- Type
- RMP_List
Example
var myList = RMPApplication.getList( "myListVariable"); -
<static> getVariable(name) → {String}
-
This function allows to get the value of a widget of your current web page (text input for instance)
Parameters:
Name Type Description name
String Returns:
- Type
- String
-
<static> isEnabled(name) → {boolean}
-
This function returns true if a widget is active and false otherwise
Parameters:
Name Type Description name
String Returns:
- Type
- boolean
-
<static> isIndexedVariable(name) → {boolean}
-
This function returns true if a widget is part of an array and false otherwise
Parameters:
Name Type Description name
String Returns:
- Type
- boolean
-
<static> isValid(name) → {boolean}
-
This function returns true if a widget matches its pattern and false otherwise
Parameters:
Name Type Description name
String Returns:
- Type
- boolean
-
<static> isValidIndexedVariable(name, index) → {boolean}
-
This function returns true if a widget of an array matches "pattern" validation and false otherwise
Parameters:
Name Type Description name
String index
String Returns:
- Type
- boolean
-
<static> isVisible(name) → {boolean}
-
This function returns true if a widget is visible and false otherwise
Parameters:
Name Type Description name
String Returns:
- Type
- boolean
-
<static> registerRequiredVariable(name)
-
This function allows to set a widget as mandatory (display message should be configured during form Design phase)
Parameters:
Name Type Description name
String -
<static> removeListener(listener)
-
This function allows to remove the previous listener.
Parameters:
Name Type Description listener
RMPApplication~VariableHandler -
<static> save(successCallback, failureCallback)
-
This function saves current web interface with data filled by user, it does the same job as the widget button "save document"
Parameters:
Name Type Description successCallback
RMPApplication~SaveCallback failureCallback
RMPApplication~SaveCallback -
<static> set(name, value)
-
Alias to RMPApplication.setVariable
Parameters:
Name Type Description name
String value
String -
<static> setEnabled(name, enabled)
-
This function allows to set a widget as active/inactive
Parameters:
Name Type Description name
String enabled
boolean -
<static> setIndexedVariable(name, value, index)
-
This function sets the value of a widget of an array index is a string starting at "0") :
RMPApplication.setIndexedVariable("mycol1","newvalue","2") Parameters:
Name Type Description name
String value
String index
String -
<static> setList(name, list)
-
This function sets a RMP_List. If your variable based list is in an array, don't forget to add "array variable" before "variable based list variable".
Parameters:
Name Type Description name
String list
RMP_List Example
RMPApplication.setList( "mylistvar", rmpList ); RMPApplication.setList( "myarray.mylistvar", rmpList ); -
<static> setVariable(name, value)
-
This function allows to set the value of a widget of your current web page (list for instance)
Parameters:
Name Type Description name
String value
String -
<static> setVisible(name, visible)
-
This function allows to set a widget as visible/invisible
Parameters:
Name Type Description name
String visible
boolean -
<static> showErrorBox(title, message)
-
This function opens a pop-up box (like an "alert").
Parameters:
Name Type Description title
String message
String -
<static> transpose(object) → {Object}
-
This function transposes a JSON object to a JSON array and vice versa
Parameters:
Name Type Description object
Object to transpose Returns:
- Type
- Object
Example
var rows=[{"a":"a1","b":"b1"},{"a":"a2","b":"b2"}]; var to_columns = RMPApplication.transpose(rows); // {"a":["a1","a2"],"b":["b1","b2"]} var to_rows = RMPApplication.transpose(to_columns); // [{"a":"a1","b":"b1"},{"a":"a2","b":"b2"}] -
<static> uuid() → {String}
-
This function generates a RFC4122 v4 UUID
Returns:
- Type
- String
Example
"109156be-c4fb-41ea-b1b4-efe1671c5836" -
<static> validate() → {boolean}
-
This function returns true if all mandatory fields are filled and match their pattern and false otherwise.
Returns:
- Type
- boolean
Type Definitions
-
ProcessExecutionHandler(name, status, content)
-
This callback is used to handle the execution of a process
Parameters:
Name Type Description name
String process name status
String process execution status content
String execution result - Deprecated:
- Yes
- See:
-
SaveCallback()
-
Called after the save of the web interface
-
VariableHandler(name, newvalue, P_index, widget)
-
This handler is used when a variable value changed
Parameters:
Name Type Description name
String variable name newvalue
String variable value P_index
int index of the selected RMP_Array line (-1 if any) widget
Object widget object (null if any) -
WidgetVisitor(widget)
-
Function applied to a widget
Parameters:
Name Type Description widget
Object