{dialog.object}editorFromValue Method
Syntax
Arguments
- UXEditorSetstring
The name of the EditorSet you want to open.
- UXEditorstring
The name of the Editor within the specified EditorSet to use.
- valueToEditAny Type
The value that you want to edit in the Editor.
- settingsObjectobject
An object with the following defined properties:
- commitfunction
Required. A function to call to 'commit' the value when the EditorSet is committed. The 'commit' function gets passed 'value' (the edited value) and 'settings' (settings.state.value is the initial value passed to the editor.) See example below.
Description
Displays an EditorSet showing the specified Editor in the EditorSet to edit an arbitrary value. Contrast with the .editorFromControl() method which is used to edit a value in a UX control.
Discussion
Typically used in mobile applications where you want to define special editors (that display in a pop-up window or Panel) to edit some value.
Example
//Edit some arbitrary value //first call some function you have defined to get the value you want to edit var valueToEdit = getValueToEdit(); //next, define a settings object that has a 'commit' property to define the commit function var settingsObj = { commit = function(value,settings) { //add code here to save the edited value (passed in as 'value') } }; //now open the editor {dialog.object}.editorFromValue('EDITORSET_1','EDITOR_1',valueToEdit,settingsObj);
See Also