Logo

Docs

  • HOME

RMP_List

new RMP_List()

RunMyProcess List
Example
    var list = new RMP_List();
 

Methods

addItem(value, label)

Adds an element to a "RunMyProcess List".
Parameters:
Name Type Description
value String
label String
Example
  list.addItem("One","1");
 

fromArray(object)

this function sets a "RunMyProcess List" from a json array.
Parameters:
Name Type Description
object Object
Example
 list.fromArray([{'label':'toto', 'value':2},{'label':'titi',value:3}]);
 

fromJSONArray(json)

this function sets a "RunMyProcess List" from the string format of a json array.
Parameters:
Name Type Description
json Object
Example
 var jsonString = "[{'label':'toto', 'value':2},{'label':'titi',value:3}]";
 list.fromJSONArray(jsonString);
 

fromJSONObject(json)

this function sets a "RunMyProcess List" from a string format of a json object.
Parameters:
Name Type Description
json Object
Example
 var jsonString = '{ "list": [{"label":"aa", "value":"bb"}], "valueField":"value", "labelField":"label", "listField":"list" };';
 list.fromJSONObject(jsonString);
 

fromObject(object)

this function sets a "RunMyProcess List" from an object configuration
Parameters:
Name Type Description
object Object
Example
 var object = { "list": [{"label":"aa", "value":"bb"}], "valueField":"value", "labelField":"label", "listField":"list" };
 list.fromObject(object);
 

getItemAt(index) → {Object}

this function returns a value/label structure of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
Returns:
Type
Object
Example
 var myitem = list.getItemAt("0");
 alert(myitem.label);
 alert(myitem.value);
 

getItemFromLabel(label) → {Object}

This function returns item from list according to a given label.
Parameters:
Name Type Description
label String
Returns:
Type
Object

getItemFromValue(value) → {Object}

this function returns item from list according to a given value.
Parameters:
Name Type Description
value String
Returns:
Type
Object
Example
    {"label":"xxx","value":"yyy"}
 

getItemIndexFromLabel(label) → {int}

This function returns index of an item from list according to a given label.
Parameters:
Name Type Description
label String
Returns:
Type
int

getItemIndexFromValue(value) → {Object}

this function returns item from list according to a given index (First item of a list has index 0).
Parameters:
Name Type Description
value String
Returns:
Type
Object

getItemLabel(item) → {String}

this function returns the label of a "RunMyProcess List" item
Parameters:
Name Type Description
item Object
Returns:
Type
String

getItemLabelAt(index) → {String}

this function returns label of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
Returns:
Type
String
Example
  var item = list.getItemLabelAt("0");
 

getItemLabelFromValue(value) → {String}

this function returns label from list according to a given value
Parameters:
Name Type Description
value String
Returns:
Type
String

getItemValue(item) → {String}

this function returns the value of a "RunMyProcess List" item
Parameters:
Name Type Description
item Object
Returns:
Type
String

getItemValueAt(index) → {String}

this function returns value of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
Returns:
Type
String
Example
  var item = list.getItemValueAt("0");
 

getItemValueFromLabel(label) → {String}

This function returns value from list according to a given label
Parameters:
Name Type Description
label String
Returns:
Type
String

getLabelField() → {String}

this function returns label field name of a "RunMyProcess List".
Returns:
Type
String
Example
  var field = list.getLabelField();
 

getListField() → {String}

returns the list field name of a "RunMyProcess List".
Returns:
Type
String

getValueField() → {String}

this function returns value field name of a "RunMyProcess List".
Returns:
Type
String
Example
  var field = list.getValueField();
 

removeItemAt(index)

this function removes an element of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
Example
  list.removeItemAt("0");
 

removeItemFromLabel(label)

This function remove a given item from list according to a given label.
Parameters:
Name Type Description
label String

removeItemFromValue(value)

This function remove a given item from list according to a given value.
Parameters:
Name Type Description
value String

setItemLabel(item, label)

this function replaces the label of a "RunMyProcess List" item.
Parameters:
Name Type Description
item Object
label String
Example
  list.setItemLabelAt(item, "Ten");
 

setItemLabelAt(index, label)

this function replaces the label of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
label String
Example
  list.setItemLabelAt("0", "Ten");
 

setItemValue(item, value)

this function replaces the value of a "RunMyProcess List" item.
Parameters:
Name Type Description
item Object
value String
Example
  list.setItemLabelAt(item, "New value");
 

setItemValueAt(index, value)

this function replaces value of a "RunMyProcess List" at a given index (starting at 0).
Parameters:
Name Type Description
index String
value String
Example
 list.setItemValueAt("0", "10");
 

setLabelField(labelField)

this function sets label field name for a "RunMyProcess List" when label field name is not called "label".
Parameters:
Name Type Description
labelField String
Example
 list.setLabelField("description");
 

setListField(listField)

this function sets list field name for a "RunMyProcess List" when list field name is not called "list".
Parameters:
Name Type Description
listField String
Example
 list.setValueField("name");
 

setValueField(valueField)

this function sets value field name for a "RunMyProcess List" when value field name is not called "value".
Parameters:
Name Type Description
valueField String
Example
 list.setValueField("name");
 

size() → {int}

returns the size of the "RunMyProcess List".
Returns:
Type
int

toString() → {String}

Returns the string representation of a "RunMyProcess List"
Returns:
Type
String

Index

Widgets

  • RMP_Array

  • RMP_Button

  • RMP_Captcha

  • RMP_CheckBox

  • RMP_CustomWidget

  • RMP_FileUpload

  • RMP_GeoLocation

  • RMP_History

  • RMP_Html

  • RMP_HtmlPreview

  • RMP_Image

  • RMP_IncludedCollection

  • RMP_List

  • RMP_ListBox

  • RMP_ListenerComponent

  • RMP_MultiSelectionCheckBox

  • RMP_ProgressBar

  • RMP_RadioButton

  • RMP_Report

  • RMP_Scripter

  • RMP_Section

  • RMP_Spinner

  • RMP_StaticTextArea

  • RMP_TabPanel

  • RMP_TextInput

  • RMP_Tree

  • RMP_UrlInput

Static

  • JSON

  • RMP_RunMyApp

  • RMPApplication

  • RMPWidgets


© Akorbi Digital RMP. All Rights Reserved - Legal terms - Contact