Class: Edit

Edit()

new Edit()

Source:
Requires:
  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Extends

Requires

  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Members

app

A reference to the globa App object
Overrides:
Source:

attributeMap

Properties:
Name Type Description
Creates Object a setter map to html nodes, namely: * validationContent => validationContentNode's innerHTML
Overrides:
Source:

cancelTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar cancel button
Overrides:
Source:

concurrencyErrorText

Properties:
Name Type Description
Text String alerted to user when the data has been updated since they last fetched the data.
Overrides:
Source:

concurrencySummaryItemTemplate

Properties:
Name Type Description
* Simplate `$` => validation error object
Overrides:
Source:

concurrencySummaryTemplate

Properties:
Name Type Description
HTML Simplate for the concurrency error area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

concurrencySummaryText

Overrides:
Source:

customizationSet

Properties:
Name Type Description
The String customization identifier for this class. When a customization is registered it is passed a path/identifier which is then matched to this property.
Overrides:
Source:

detailsText

Properties:
Name Type Description
Default String text used in the section header
Overrides:
Source:

diffPropertyIgnores

Array of strings that will get ignored when the diffing runs.
Overrides:
Source:

enableCustomizations

Overrides:
Source:

entry

Properties:
Name Type Description
The Object saved data response.
Overrides:
Source:

errorHandlers

Properties:
Name Type Description
errorHandlers Array Array of objects that should contain a name string property, test function, and handle function.
Overrides:
Source:

errorText

Properties:
Name Type Description
Localized Object error messages. One general error message, and messages by HTTP status code.
Overrides:
Source:

expose

Overrides:
Source:

fields

Properties:
Name Type Description
Collection Object of the fields in the layout where the key is the `name` of the field.
Overrides:
Source:

HTTP_STATUS

Properties:
Name Type Description
Http Object Error Status codes. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Overrides:
Source:

id

Overrides:
Source:

inserting

Properties:
Name Type Description
Flags Boolean if the view is in "insert" (create) mode, or if it is in "update" (edit) mode.
Overrides:
Source:

insertSecurity

Overrides:
Source:

layout

Properties:
Name Type Description
The Object layout definition that constructs the detail view with sections and rows
Overrides:
Source:

loadingTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. `$` => the view instance
Overrides:
Source:

loadingText

Properties:
Name Type Description
Text String shown while the view is loading.
Overrides:
Source:

modelName

Registered model name to use.
Overrides:
Source:

multiColumnClass

Properties:
Name Type Description
SoHo string class to be applied on multi column.
Overrides:
Source:

multiColumnCount

Properties:
Name Type Description
Number number of columns in view
Overrides:
Source:

multiColumnView

Properties:
Name Type Description
Flags Boolean if the view is multi column or single column.
Overrides:
Source:

propertyTemplate

Properties:
Name Type Description
HTML Simplate created for each property (field row). * `$` => the field row object defined in createLayout. * `$$` => the view instance
Overrides:
Source:

route

Properties:
Name Type Description
Route String passed into the router. RegEx expressions are also accepted.
Overrides:
Source:

saveText

Overrides:
Deprecated:
  • Yes
Source:

saveTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar save button
Overrides:
Source:

sectionBeginTemplate

Properties:
Name Type Description
HTML Simplate that starts a new section including the collapsible header `$` => the view instance
Overrides:
Source:

sectionEndTemplate

Properties:
Name Type Description
HTML Simplate that ends a section `$` => the view instance
Overrides:
Source:

security

May be defined along with Application hasAccessTo to incorporate View restrictions.
Overrides:
Source:

serviceName

May be used to specify the service name to use for data requests. Setting false will force the use of the default service.
Properties:
Type Description
String/Boolean
Overrides:
Source:

titleText

Overrides:
Source:

toggleCollapseText

Properties:
Name Type Description
ARIA String label text for a collapsible section header
Overrides:
Source:

tools

This views toolbar layout that defines all toolbar items in all toolbars.
Properties:
Type Description
Object
Overrides:
Source:

updateSecurity

Overrides:
Source:

validationSummaryItemTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. * `$` => validation error object * `$$` => field instance that the error is on
Overrides:
Source:

validationSummaryTemplate

Properties:
Name Type Description
HTML Simplate for the validation summary area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

validationSummaryText

Overrides:
Source:

viewType

View type (detail, edit, list, etc)
Overrides:
Source:

widgetTemplate

Properties:
Name Type Description
The Simplate template used to render the view's main DOM element when the view is initialized. This template includes loadingTemplate and validationSummaryTemplate. The default template uses the following properties: name description ---------------------------------------------------------------- id main container div id title main container div title attr cls additional class string added to the main container div resourceKind set to data-resource-kind
Overrides:
Source:

Methods

_onDisableField(field)

Handler for a fields on disable event. Adds the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being disabled
Overrides:
Source:

_onEnableField(field)

Handler for a fields on enable event. Removes the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being enabled
Overrides:
Source:

_onHideField(field)

Handler for a fields on hide event. Adds the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being hidden
Overrides:
Source:

_onShowField(field)

Handler for a fields on show event. Removes the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being shown
Overrides:
Source:

activate()

Empties the activate method which prevents detection of refresh from transititioning. External navigation (browser back/forward) never refreshes the edit view as it's always a terminal loop. i.e. you never move "forward" from an edit view; you navigate to child editors, from which you always return.
Overrides:
Source:

applyFieldDefaults()

Loops all the fields looking for any with the `default` property set, if set apply that value as the initial value of the field. If the value is a function, its expanded then applied.
Overrides:
Source:

beforeTransitionAway()

Called before the view is transitioned (slide animation complete) away from.
Overrides:
Source:

beforeTransitionTo()

Extends beforeTransitionTo to add the loading styling if refresh is needed
Overrides:
Source:

buildRoute() → {String}

Show method calls this to build a route that it can navigate to. If you add a custom route, this should change to build a route that can match that.
Overrides:
Source:
Returns:
Type
String

clearValues()

Loops all fields and calls its `clearValue()`.
Overrides:
Source:

convertEntry(entry) → {Object}

Pre-processes the entry before processEntry runs.
Parameters:
Name Type Description
entry Object data
Overrides:
Source:
Returns:
entry with actual Date objects
Type
Object

convertValues()

Function to call to tranform values before save
Overrides:
Source:

createEntryForInsert(values) → {Object}

Takes the values object and adds the needed propertiers for creating/inserting.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for inserting
Type
Object

createEntryForUpdate(values) → {Object}

Takes the values object and adds the needed propertiers for updating.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for updating
Type
Object

createErrorHandlers() → {Array}

Overrides:
Source:
Returns:
Returns an array of error handlers
Type
Array

createItem() → {Object}

Gathers the values for the entry to send back and returns the appropriate payload for creating or updating.
Overrides:
Source:
Returns:
Entry/payload
Type
Object

createLayout() → {Array.<Object>}

Sets and returns the Edit view layout by following a standard for section and field: The `this.layout` itself is an array of section objects where a section object is defined as such: { name: 'String', // Required. unique name for identification/customization purposes title: 'String', // Required. Text shown in the section header children: [], // Array of child row objects } A child row object has: { name: 'String', // Required. unique name for identification/customization purposes property: 'String', // Optional. The property of the current entity to bind to label: 'String', // Optional. Text shown in the label to the left of the property type: 'String', // Required. The field type as registered with the FieldManager. // Examples of type: 'text', 'decimal', 'date', 'lookup', 'select', 'duration' 'default': value // Optional. If defined the value will be set as the default "unmodified" value (not dirty). } All further properties are set by their respective type, please see the individual field for its configurable options.
Overrides:
Source:
Returns:
Edit layout definition
Type
Array.<Object>

createToolLayout() → {Object}

Sets and returns the toolbar item layout definition, this method should be overriden in the view so that you may define the views toolbar items. By default it adds a save button bound to `this.save()` and cancel that fires `ReUI.back()`
Overrides:
Source:
Returns:
this.tools
Type
Object

diffs()

Diffs the results from the current values and the previous values. This is done for a concurrency check to indicate what has changed.
Overrides:
Source:
Returns:
Array List of property names that have changed

disable()

Disables the form by setting busy to true and disabling the toolbar.
Overrides:
Source:

enable()

Enables the form by setting busy to false and enabling the toolbar
Overrides:
Source:

expandExpression(expression) → {String}

Expands the passed expression if it is a function.
Parameters:
Name Type Description
expression String/Function Returns string directly, if function it is called and the result returned.
Overrides:
Source:
Returns:
String expression.
Type
String

getContext()

Extends the getContext function to also include the `resourceKind` of the view, `insert` state and `key` of the entry (false if inserting)
Overrides:
Source:

getErrorMessage()

Gets the general error message, or the error message for the status code.
Overrides:
Source:

getModel()

Returns a new instance of a model for the view.
Overrides:
Source:

getOptionsContext() → {Object}

Returns the options used for the View getContext().
Overrides:
Source:
Returns:
Options to be used for context.
Type
Object

getRoute()

Gets the route associated with this view. Returns this.id if no route is defined.
Overrides:
Source:

getSecurity(access)

Wrapper for detecting security for update mode or insert mode
Parameters:
Name Type Description
access String Can be either "update" or "insert"
Overrides:
Source:

getService() → {Object}

Returns the primary SDataService instance for the view.
Overrides:
Source:
Returns:
The Sage.SData.Client.SDataService instance.
Type
Object

getTag() → {String}

Returns the view key
Overrides:
Source:
Returns:
View key
Type
String

getTools() → {Object}

Called from Applications view transition handler and returns the fully customized toolbar layout.
Overrides:
Source:
Returns:
The toolbar layout
Type
Object

getValues(all) → {Object}

Retrieves the value from every field, skipping the ones excluded, and merges them into a single payload with the key being the fields `property` attribute, taking into consideration `applyTo` if defined. If all is passed as true, it also grabs hidden and unmodified (clean) values.
Parameters:
Name Type Description
all Boolean True to also include hidden and unmodified values.
Overrides:
Source:
Returns:
A single object payload with all the values.
Type
Object

handleError(error)

Starts matching and executing errorHandlers.
Parameters:
Name Type Description
error Error Error to pass to the errorHandlers
Overrides:
Source:

hasAction(name, evt, node) → {Boolean}

Determines if a field has defined on it the supplied name as a function
Parameters:
Name Type Description
name String Name of the function to test for
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
If the field has the named function defined
Type
Boolean

hideConcurrencySummary()

Removes teh summary for concurrency errors
Overrides:
Source:

hideValidationSummary()

Removes the summary validation visible styling and empties its contents of error markup
Overrides:
Source:

init()

Extends init to also init the fields in `this.fields`.
Overrides:
Source:

initConnects()

Establishes this views connections to various events
Overrides:
Source:

initModel()

Initializes the model instance that is returned with the current view.
Overrides:
Source:

insert()

Called by save() when performing an insert (create). Gathers the values, creates the payload for insert, creates the sdata request and calls `create`.
Overrides:
Source:

invokeAction(name, parameters, evt, node) → {function}

Extends invokeAction to first look for the specified function name on the field instance first before passing it to the view.
Parameters:
Name Type Description
name String Name of the function to invoke
parameters Object Parameters of the function to be passed
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
Either calls the fields action or returns the inherited version which looks at the view for the action
Type
function

isDisabled() → {Boolean}

Returns true if view is disabled.
Overrides:
Source:
Returns:
.
Type
Boolean

isFormDisabled() → {Boolean}

Determines if the form is currently busy/disabled
Overrides:
Source:
Returns:
Type
Boolean

load()

Called once the first time the view is about to be transitioned to.
Overrides:
Deprecated:
  • Yes
Source:

onActivate(self)

The onActivate event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionAway(self)

The onBeforeTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionTo(self)

The onBeforeTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onInsertCompleted(entry)

Handler for insert complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

onShow(self)

The onShow event.
Parameters:
Name Type Description
self
Overrides:
Source:

onToolLayoutCreated()

Called after toolBar layout is created;
Overrides:
Source:

onTransitionAway(self)

The onTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onTransitionTo(self)

The onTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onUpdateCompleted(entry)

Handler for update complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

open()

Available Options: horizontal: True if the transition is horizontal, False otherwise. reverse: True if the transition is a reverse transition (right/down), False otherwise. track: False if the transition should not be tracked in history, True otherwise. update: False if the transition should not update title and back button, True otherwise. scroll: False if the transition should not scroll to the top, True otherwise.
Overrides:
Source:

refresh()

Refresh first clears out any variables set to previous data. The mode of the Edit view is set and determined via `this.options.insert`, and the views values are cleared. Lastly it makes the appropiate data request:
Overrides:
Source:

refreshRequiredFor(options)

Extends refreshRequiredFor to return false if we already have the key the options is passing
Parameters:
Name Type Description
options Object Navigation options from previous view
Overrides:
Source:

requestData()

Initiates the request.
Overrides:
Source:

routeLoad(ctx, next)

Fires first when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

routeShow(ctx, next)

Fires second when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

save()

Handler for the save toolbar action. First validates the forms, showing errors and stoping saving if found. Then calls either insert or update based upon `this.inserting`.
Overrides:
Source:

setValues(values, initial)

Sets the given values by looping the fields and checking if the field property matches a key in the passed values object (after considering a fields `applyTo`). The value set is then passed the initial state, true for default/unmodified/clean and false for dirty or altered.
Parameters:
Name Type Description
values Object data entry, or collection of key/values where key matches a fields property attribute
initial Boolean Initial state of the value, true for clean, false for dirty
Overrides:
Source:

show(options, transitionOptions)

Shows the view using pagejs in order to transition to the new element.
Parameters:
Name Type Description
options Object The navigation options passed from the previous view.
transitionOptions Object Optional transition object that is forwarded to open.
Overrides:
Source:

showValidationSummary()

Creates the markup by applying the `validationSummaryItemTemplate` to each entry in `this.errors` then sets the combined result into the summary validation node and sets the styling to visible
Overrides:
Source:

startup()

When the app is started this fires, the Edit view renders its layout immediately, then renders each field instance. On refresh it will clear the values, but leave the layout intact.
Overrides:
Source:

transitionAway()

Called after the view has been transitioned (slide animation complete) away from.
Overrides:
Source:

transitionTo()

Called after the view has been transitioned (slide animation complete) to.
Overrides:
Source:

update()

Called by save() when performing an update (edit). Gathers the values, creates the payload for update, creates the sdata request and calls `update`.
Overrides:
Source:

validate() → {Array.<Boolean/Object>}

Loops and gathers the validation errors returned from each field and adds them to the validation summary area. If no errors, removes the validation summary.
Overrides:
Source:
Returns:
Returns the array of errors if present or false for no errors.
Type
Array.<Boolean/Object>

Edit()

new Edit()

Source:
Requires:
  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Extends

Requires

  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Members

app

A reference to the globa App object
Overrides:
Source:

attributeMap

Properties:
Name Type Description
Creates Object a setter map to html nodes, namely: * validationContent => validationContentNode's innerHTML
Overrides:
Source:

cancelTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar cancel button
Overrides:
Source:

concurrencyErrorText

Properties:
Name Type Description
Text String alerted to user when the data has been updated since they last fetched the data.
Overrides:
Source:

concurrencySummaryItemTemplate

Properties:
Name Type Description
* Simplate `$` => validation error object
Overrides:
Source:

concurrencySummaryTemplate

Properties:
Name Type Description
HTML Simplate for the concurrency error area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

concurrencySummaryText

Overrides:
Source:

customizationSet

Properties:
Name Type Description
The String customization identifier for this class. When a customization is registered it is passed a path/identifier which is then matched to this property.
Overrides:
Source:

detailsText

Properties:
Name Type Description
Default String text used in the section header
Overrides:
Source:

diffPropertyIgnores

Array of strings that will get ignored when the diffing runs.
Overrides:
Source:

enableCustomizations

Overrides:
Source:

entry

Properties:
Name Type Description
The Object saved data response.
Overrides:
Source:

errorHandlers

Properties:
Name Type Description
errorHandlers Array Array of objects that should contain a name string property, test function, and handle function.
Overrides:
Source:

errorText

Properties:
Name Type Description
Localized Object error messages. One general error message, and messages by HTTP status code.
Overrides:
Source:

expose

Overrides:
Source:

fields

Properties:
Name Type Description
Collection Object of the fields in the layout where the key is the `name` of the field.
Overrides:
Source:

HTTP_STATUS

Properties:
Name Type Description
Http Object Error Status codes. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Overrides:
Source:

id

Overrides:
Source:

inserting

Properties:
Name Type Description
Flags Boolean if the view is in "insert" (create) mode, or if it is in "update" (edit) mode.
Overrides:
Source:

insertSecurity

Overrides:
Source:

layout

Properties:
Name Type Description
The Object layout definition that constructs the detail view with sections and rows
Overrides:
Source:

loadingTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. `$` => the view instance
Overrides:
Source:

loadingText

Properties:
Name Type Description
Text String shown while the view is loading.
Overrides:
Source:

modelName

Registered model name to use.
Overrides:
Source:

multiColumnClass

Properties:
Name Type Description
SoHo string class to be applied on multi column.
Overrides:
Source:

multiColumnCount

Properties:
Name Type Description
Number number of columns in view
Overrides:
Source:

multiColumnView

Properties:
Name Type Description
Flags Boolean if the view is multi column or single column.
Overrides:
Source:

propertyTemplate

Properties:
Name Type Description
HTML Simplate created for each property (field row). * `$` => the field row object defined in createLayout. * `$$` => the view instance
Overrides:
Source:

route

Properties:
Name Type Description
Route String passed into the router. RegEx expressions are also accepted.
Overrides:
Source:

saveText

Overrides:
Deprecated:
  • Yes
Source:

saveTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar save button
Overrides:
Source:

sectionBeginTemplate

Properties:
Name Type Description
HTML Simplate that starts a new section including the collapsible header `$` => the view instance
Overrides:
Source:

sectionEndTemplate

Properties:
Name Type Description
HTML Simplate that ends a section `$` => the view instance
Overrides:
Source:

security

May be defined along with Application hasAccessTo to incorporate View restrictions.
Overrides:
Source:

serviceName

May be used to specify the service name to use for data requests. Setting false will force the use of the default service.
Properties:
Type Description
String/Boolean
Overrides:
Source:

titleText

Overrides:
Source:

toggleCollapseText

Properties:
Name Type Description
ARIA String label text for a collapsible section header
Overrides:
Source:

tools

This views toolbar layout that defines all toolbar items in all toolbars.
Properties:
Type Description
Object
Overrides:
Source:

updateSecurity

Overrides:
Source:

validationSummaryItemTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. * `$` => validation error object * `$$` => field instance that the error is on
Overrides:
Source:

validationSummaryTemplate

Properties:
Name Type Description
HTML Simplate for the validation summary area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

validationSummaryText

Overrides:
Source:

viewType

View type (detail, edit, list, etc)
Overrides:
Source:

widgetTemplate

Properties:
Name Type Description
The Simplate template used to render the view's main DOM element when the view is initialized. This template includes loadingTemplate and validationSummaryTemplate. The default template uses the following properties: name description ---------------------------------------------------------------- id main container div id title main container div title attr cls additional class string added to the main container div resourceKind set to data-resource-kind
Overrides:
Source:

Methods

_onDisableField(field)

Handler for a fields on disable event. Adds the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being disabled
Overrides:
Source:

_onEnableField(field)

Handler for a fields on enable event. Removes the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being enabled
Overrides:
Source:

_onHideField(field)

Handler for a fields on hide event. Adds the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being hidden
Overrides:
Source:

_onShowField(field)

Handler for a fields on show event. Removes the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being shown
Overrides:
Source:

activate()

Empties the activate method which prevents detection of refresh from transititioning. External navigation (browser back/forward) never refreshes the edit view as it's always a terminal loop. i.e. you never move "forward" from an edit view; you navigate to child editors, from which you always return.
Overrides:
Source:

applyFieldDefaults()

Loops all the fields looking for any with the `default` property set, if set apply that value as the initial value of the field. If the value is a function, its expanded then applied.
Overrides:
Source:

beforeTransitionAway()

Called before the view is transitioned (slide animation complete) away from.
Overrides:
Source:

beforeTransitionTo()

Extends beforeTransitionTo to add the loading styling if refresh is needed
Overrides:
Source:

buildRoute() → {String}

Show method calls this to build a route that it can navigate to. If you add a custom route, this should change to build a route that can match that.
Overrides:
Source:
Returns:
Type
String

clearValues()

Loops all fields and calls its `clearValue()`.
Overrides:
Source:

convertEntry(entry) → {Object}

Pre-processes the entry before processEntry runs.
Parameters:
Name Type Description
entry Object data
Overrides:
Source:
Returns:
entry with actual Date objects
Type
Object

convertValues()

Function to call to tranform values before save
Overrides:
Source:

createEntryForInsert(values) → {Object}

Takes the values object and adds the needed propertiers for creating/inserting.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for inserting
Type
Object

createEntryForUpdate(values) → {Object}

Takes the values object and adds the needed propertiers for updating.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for updating
Type
Object

createErrorHandlers() → {Array}

Overrides:
Source:
Returns:
Returns an array of error handlers
Type
Array

createItem() → {Object}

Gathers the values for the entry to send back and returns the appropriate payload for creating or updating.
Overrides:
Source:
Returns:
Entry/payload
Type
Object

createLayout() → {Array.<Object>}

Sets and returns the Edit view layout by following a standard for section and field: The `this.layout` itself is an array of section objects where a section object is defined as such: { name: 'String', // Required. unique name for identification/customization purposes title: 'String', // Required. Text shown in the section header children: [], // Array of child row objects } A child row object has: { name: 'String', // Required. unique name for identification/customization purposes property: 'String', // Optional. The property of the current entity to bind to label: 'String', // Optional. Text shown in the label to the left of the property type: 'String', // Required. The field type as registered with the FieldManager. // Examples of type: 'text', 'decimal', 'date', 'lookup', 'select', 'duration' 'default': value // Optional. If defined the value will be set as the default "unmodified" value (not dirty). } All further properties are set by their respective type, please see the individual field for its configurable options.
Overrides:
Source:
Returns:
Edit layout definition
Type
Array.<Object>

createToolLayout() → {Object}

Sets and returns the toolbar item layout definition, this method should be overriden in the view so that you may define the views toolbar items. By default it adds a save button bound to `this.save()` and cancel that fires `ReUI.back()`
Overrides:
Source:
Returns:
this.tools
Type
Object

diffs()

Diffs the results from the current values and the previous values. This is done for a concurrency check to indicate what has changed.
Overrides:
Source:
Returns:
Array List of property names that have changed

disable()

Disables the form by setting busy to true and disabling the toolbar.
Overrides:
Source:

enable()

Enables the form by setting busy to false and enabling the toolbar
Overrides:
Source:

expandExpression(expression) → {String}

Expands the passed expression if it is a function.
Parameters:
Name Type Description
expression String/Function Returns string directly, if function it is called and the result returned.
Overrides:
Source:
Returns:
String expression.
Type
String

getContext()

Extends the getContext function to also include the `resourceKind` of the view, `insert` state and `key` of the entry (false if inserting)
Overrides:
Source:

getErrorMessage()

Gets the general error message, or the error message for the status code.
Overrides:
Source:

getModel()

Returns a new instance of a model for the view.
Overrides:
Source:

getOptionsContext() → {Object}

Returns the options used for the View getContext().
Overrides:
Source:
Returns:
Options to be used for context.
Type
Object

getRoute()

Gets the route associated with this view. Returns this.id if no route is defined.
Overrides:
Source:

getSecurity(access)

Wrapper for detecting security for update mode or insert mode
Parameters:
Name Type Description
access String Can be either "update" or "insert"
Overrides:
Source:

getService() → {Object}

Returns the primary SDataService instance for the view.
Overrides:
Source:
Returns:
The Sage.SData.Client.SDataService instance.
Type
Object

getTag() → {String}

Returns the view key
Overrides:
Source:
Returns:
View key
Type
String

getTools() → {Object}

Called from Applications view transition handler and returns the fully customized toolbar layout.
Overrides:
Source:
Returns:
The toolbar layout
Type
Object

getValues(all) → {Object}

Retrieves the value from every field, skipping the ones excluded, and merges them into a single payload with the key being the fields `property` attribute, taking into consideration `applyTo` if defined. If all is passed as true, it also grabs hidden and unmodified (clean) values.
Parameters:
Name Type Description
all Boolean True to also include hidden and unmodified values.
Overrides:
Source:
Returns:
A single object payload with all the values.
Type
Object

handleError(error)

Starts matching and executing errorHandlers.
Parameters:
Name Type Description
error Error Error to pass to the errorHandlers
Overrides:
Source:

hasAction(name, evt, node) → {Boolean}

Determines if a field has defined on it the supplied name as a function
Parameters:
Name Type Description
name String Name of the function to test for
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
If the field has the named function defined
Type
Boolean

hideConcurrencySummary()

Removes teh summary for concurrency errors
Overrides:
Source:

hideValidationSummary()

Removes the summary validation visible styling and empties its contents of error markup
Overrides:
Source:

init()

Extends init to also init the fields in `this.fields`.
Overrides:
Source:

initConnects()

Establishes this views connections to various events
Overrides:
Source:

initModel()

Initializes the model instance that is returned with the current view.
Overrides:
Source:

insert()

Called by save() when performing an insert (create). Gathers the values, creates the payload for insert, creates the sdata request and calls `create`.
Overrides:
Source:

invokeAction(name, parameters, evt, node) → {function}

Extends invokeAction to first look for the specified function name on the field instance first before passing it to the view.
Parameters:
Name Type Description
name String Name of the function to invoke
parameters Object Parameters of the function to be passed
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
Either calls the fields action or returns the inherited version which looks at the view for the action
Type
function

isDisabled() → {Boolean}

Returns true if view is disabled.
Overrides:
Source:
Returns:
.
Type
Boolean

isFormDisabled() → {Boolean}

Determines if the form is currently busy/disabled
Overrides:
Source:
Returns:
Type
Boolean

load()

Called once the first time the view is about to be transitioned to.
Overrides:
Deprecated:
  • Yes
Source:

onActivate(self)

The onActivate event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionAway(self)

The onBeforeTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionTo(self)

The onBeforeTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onInsertCompleted(entry)

Handler for insert complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

onShow(self)

The onShow event.
Parameters:
Name Type Description
self
Overrides:
Source:

onToolLayoutCreated()

Called after toolBar layout is created;
Overrides:
Source:

onTransitionAway(self)

The onTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onTransitionTo(self)

The onTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onUpdateCompleted(entry)

Handler for update complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

open()

Available Options: horizontal: True if the transition is horizontal, False otherwise. reverse: True if the transition is a reverse transition (right/down), False otherwise. track: False if the transition should not be tracked in history, True otherwise. update: False if the transition should not update title and back button, True otherwise. scroll: False if the transition should not scroll to the top, True otherwise.
Overrides:
Source:

refresh()

Refresh first clears out any variables set to previous data. The mode of the Edit view is set and determined via `this.options.insert`, and the views values are cleared. Lastly it makes the appropiate data request:
Overrides:
Source:

refreshRequiredFor(options)

Extends refreshRequiredFor to return false if we already have the key the options is passing
Parameters:
Name Type Description
options Object Navigation options from previous view
Overrides:
Source:

requestData()

Initiates the request.
Overrides:
Source:

routeLoad(ctx, next)

Fires first when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

routeShow(ctx, next)

Fires second when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

save()

Handler for the save toolbar action. First validates the forms, showing errors and stoping saving if found. Then calls either insert or update based upon `this.inserting`.
Overrides:
Source:

setValues(values, initial)

Sets the given values by looping the fields and checking if the field property matches a key in the passed values object (after considering a fields `applyTo`). The value set is then passed the initial state, true for default/unmodified/clean and false for dirty or altered.
Parameters:
Name Type Description
values Object data entry, or collection of key/values where key matches a fields property attribute
initial Boolean Initial state of the value, true for clean, false for dirty
Overrides:
Source:

show(options, transitionOptions)

Shows the view using pagejs in order to transition to the new element.
Parameters:
Name Type Description
options Object The navigation options passed from the previous view.
transitionOptions Object Optional transition object that is forwarded to open.
Overrides:
Source:

showValidationSummary()

Creates the markup by applying the `validationSummaryItemTemplate` to each entry in `this.errors` then sets the combined result into the summary validation node and sets the styling to visible
Overrides:
Source:

startup()

When the app is started this fires, the Edit view renders its layout immediately, then renders each field instance. On refresh it will clear the values, but leave the layout intact.
Overrides:
Source:

transitionAway()

Called after the view has been transitioned (slide animation complete) away from.
Overrides:
Source:

transitionTo()

Called after the view has been transitioned (slide animation complete) to.
Overrides:
Source:

update()

Called by save() when performing an update (edit). Gathers the values, creates the payload for update, creates the sdata request and calls `update`.
Overrides:
Source:

validate() → {Array.<Boolean/Object>}

Loops and gathers the validation errors returned from each field and adds them to the validation summary area. If no errors, removes the validation summary.
Overrides:
Source:
Returns:
Returns the array of errors if present or false for no errors.
Type
Array.<Boolean/Object>

Edit()

new Edit()

Source:
Requires:
  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Extends

Requires

  • module:argos.Edit
  • module:crm.Format
  • module:crm.Validator
  • module:crm.Template

Members

app

A reference to the globa App object
Overrides:
Source:

attributeMap

Properties:
Name Type Description
Creates Object a setter map to html nodes, namely: * validationContent => validationContentNode's innerHTML
Overrides:
Source:

cancelTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar cancel button
Overrides:
Source:

concurrencyErrorText

Properties:
Name Type Description
Text String alerted to user when the data has been updated since they last fetched the data.
Overrides:
Source:

concurrencySummaryItemTemplate

Properties:
Name Type Description
* Simplate `$` => validation error object
Overrides:
Source:

concurrencySummaryTemplate

Properties:
Name Type Description
HTML Simplate for the concurrency error area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

concurrencySummaryText

Overrides:
Source:

customizationSet

Properties:
Name Type Description
The String customization identifier for this class. When a customization is registered it is passed a path/identifier which is then matched to this property.
Overrides:
Source:

detailsText

Properties:
Name Type Description
Default String text used in the section header
Overrides:
Source:

diffPropertyIgnores

Array of strings that will get ignored when the diffing runs.
Overrides:
Source:

enableCustomizations

Overrides:
Source:

entry

Properties:
Name Type Description
The Object saved data response.
Overrides:
Source:

errorHandlers

Properties:
Name Type Description
errorHandlers Array Array of objects that should contain a name string property, test function, and handle function.
Overrides:
Source:

errorText

Properties:
Name Type Description
Localized Object error messages. One general error message, and messages by HTTP status code.
Overrides:
Source:

expose

Overrides:
Source:

fields

Properties:
Name Type Description
Collection Object of the fields in the layout where the key is the `name` of the field.
Overrides:
Source:

HTTP_STATUS

Properties:
Name Type Description
Http Object Error Status codes. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Overrides:
Source:

id

Overrides:
Source:

inserting

Properties:
Name Type Description
Flags Boolean if the view is in "insert" (create) mode, or if it is in "update" (edit) mode.
Overrides:
Source:

insertSecurity

Overrides:
Source:

layout

Properties:
Name Type Description
The Object layout definition that constructs the detail view with sections and rows
Overrides:
Source:

loadingTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. `$` => the view instance
Overrides:
Source:

loadingText

Properties:
Name Type Description
Text String shown while the view is loading.
Overrides:
Source:

modelName

Registered model name to use.
Overrides:
Source:

multiColumnClass

Properties:
Name Type Description
SoHo string class to be applied on multi column.
Overrides:
Source:

multiColumnCount

Properties:
Name Type Description
Number number of columns in view
Overrides:
Source:

multiColumnView

Properties:
Name Type Description
Flags Boolean if the view is multi column or single column.
Overrides:
Source:

propertyTemplate

Properties:
Name Type Description
HTML Simplate created for each property (field row). * `$` => the field row object defined in createLayout. * `$$` => the view instance
Overrides:
Source:

route

Properties:
Name Type Description
Route String passed into the router. RegEx expressions are also accepted.
Overrides:
Source:

saveText

Overrides:
Deprecated:
  • Yes
Source:

saveTooltipText

Properties:
Name Type Description
Text String shown in the top toolbar save button
Overrides:
Source:

sectionBeginTemplate

Properties:
Name Type Description
HTML Simplate that starts a new section including the collapsible header `$` => the view instance
Overrides:
Source:

sectionEndTemplate

Properties:
Name Type Description
HTML Simplate that ends a section `$` => the view instance
Overrides:
Source:

security

May be defined along with Application hasAccessTo to incorporate View restrictions.
Overrides:
Source:

serviceName

May be used to specify the service name to use for data requests. Setting false will force the use of the default service.
Properties:
Type Description
String/Boolean
Overrides:
Source:

titleText

Overrides:
Source:

toggleCollapseText

Properties:
Name Type Description
ARIA String label text for a collapsible section header
Overrides:
Source:

tools

This views toolbar layout that defines all toolbar items in all toolbars.
Properties:
Type Description
Object
Overrides:
Source:

updateSecurity

Overrides:
Source:

validationSummaryItemTemplate

Properties:
Name Type Description
HTML Simplate shown when data is being loaded. * `$` => validation error object * `$$` => field instance that the error is on
Overrides:
Source:

validationSummaryTemplate

Properties:
Name Type Description
HTML Simplate for the validation summary area, this div is shown/hidden as needed. `$` => the view instance
Overrides:
Source:

validationSummaryText

Overrides:
Source:

viewType

View type (detail, edit, list, etc)
Overrides:
Source:

widgetTemplate

Properties:
Name Type Description
The Simplate template used to render the view's main DOM element when the view is initialized. This template includes loadingTemplate and validationSummaryTemplate. The default template uses the following properties: name description ---------------------------------------------------------------- id main container div id title main container div title attr cls additional class string added to the main container div resourceKind set to data-resource-kind
Overrides:
Source:

Methods

_onDisableField(field)

Handler for a fields on disable event. Adds the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being disabled
Overrides:
Source:

_onEnableField(field)

Handler for a fields on enable event. Removes the row-disabled css class.
Parameters:
Name Type Description
field _Field Field instance that is being enabled
Overrides:
Source:

_onHideField(field)

Handler for a fields on hide event. Adds the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being hidden
Overrides:
Source:

_onShowField(field)

Handler for a fields on show event. Removes the row-hidden css class.
Parameters:
Name Type Description
field _Field Field instance that is being shown
Overrides:
Source:

activate()

Empties the activate method which prevents detection of refresh from transititioning. External navigation (browser back/forward) never refreshes the edit view as it's always a terminal loop. i.e. you never move "forward" from an edit view; you navigate to child editors, from which you always return.
Overrides:
Source:

applyFieldDefaults()

Loops all the fields looking for any with the `default` property set, if set apply that value as the initial value of the field. If the value is a function, its expanded then applied.
Overrides:
Source:

beforeTransitionAway()

Called before the view is transitioned (slide animation complete) away from.
Overrides:
Source:

beforeTransitionTo()

Extends beforeTransitionTo to add the loading styling if refresh is needed
Overrides:
Source:

buildRoute() → {String}

Show method calls this to build a route that it can navigate to. If you add a custom route, this should change to build a route that can match that.
Overrides:
Source:
Returns:
Type
String

clearValues()

Loops all fields and calls its `clearValue()`.
Overrides:
Source:

convertEntry(entry) → {Object}

Pre-processes the entry before processEntry runs.
Parameters:
Name Type Description
entry Object data
Overrides:
Source:
Returns:
entry with actual Date objects
Type
Object

convertValues()

Function to call to tranform values before save
Overrides:
Source:

createEntryForInsert(values) → {Object}

Takes the values object and adds the needed propertiers for creating/inserting.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for inserting
Type
Object

createEntryForUpdate(values) → {Object}

Takes the values object and adds the needed propertiers for updating.
Parameters:
Name Type Description
values Object
Overrides:
Source:
Returns:
Object with properties for updating
Type
Object

createErrorHandlers() → {Array}

Overrides:
Source:
Returns:
Returns an array of error handlers
Type
Array

createItem() → {Object}

Gathers the values for the entry to send back and returns the appropriate payload for creating or updating.
Overrides:
Source:
Returns:
Entry/payload
Type
Object

createLayout() → {Array.<Object>}

Sets and returns the Edit view layout by following a standard for section and field: The `this.layout` itself is an array of section objects where a section object is defined as such: { name: 'String', // Required. unique name for identification/customization purposes title: 'String', // Required. Text shown in the section header children: [], // Array of child row objects } A child row object has: { name: 'String', // Required. unique name for identification/customization purposes property: 'String', // Optional. The property of the current entity to bind to label: 'String', // Optional. Text shown in the label to the left of the property type: 'String', // Required. The field type as registered with the FieldManager. // Examples of type: 'text', 'decimal', 'date', 'lookup', 'select', 'duration' 'default': value // Optional. If defined the value will be set as the default "unmodified" value (not dirty). } All further properties are set by their respective type, please see the individual field for its configurable options.
Overrides:
Source:
Returns:
Edit layout definition
Type
Array.<Object>

createToolLayout() → {Object}

Sets and returns the toolbar item layout definition, this method should be overriden in the view so that you may define the views toolbar items. By default it adds a save button bound to `this.save()` and cancel that fires `ReUI.back()`
Overrides:
Source:
Returns:
this.tools
Type
Object

diffs()

Diffs the results from the current values and the previous values. This is done for a concurrency check to indicate what has changed.
Overrides:
Source:
Returns:
Array List of property names that have changed

disable()

Disables the form by setting busy to true and disabling the toolbar.
Overrides:
Source:

enable()

Enables the form by setting busy to false and enabling the toolbar
Overrides:
Source:

expandExpression(expression) → {String}

Expands the passed expression if it is a function.
Parameters:
Name Type Description
expression String/Function Returns string directly, if function it is called and the result returned.
Overrides:
Source:
Returns:
String expression.
Type
String

getContext()

Extends the getContext function to also include the `resourceKind` of the view, `insert` state and `key` of the entry (false if inserting)
Overrides:
Source:

getErrorMessage()

Gets the general error message, or the error message for the status code.
Overrides:
Source:

getModel()

Returns a new instance of a model for the view.
Overrides:
Source:

getOptionsContext() → {Object}

Returns the options used for the View getContext().
Overrides:
Source:
Returns:
Options to be used for context.
Type
Object

getRoute()

Gets the route associated with this view. Returns this.id if no route is defined.
Overrides:
Source:

getSecurity(access)

Wrapper for detecting security for update mode or insert mode
Parameters:
Name Type Description
access String Can be either "update" or "insert"
Overrides:
Source:

getService() → {Object}

Returns the primary SDataService instance for the view.
Overrides:
Source:
Returns:
The Sage.SData.Client.SDataService instance.
Type
Object

getTag() → {String}

Returns the view key
Overrides:
Source:
Returns:
View key
Type
String

getTools() → {Object}

Called from Applications view transition handler and returns the fully customized toolbar layout.
Overrides:
Source:
Returns:
The toolbar layout
Type
Object

getValues(all) → {Object}

Retrieves the value from every field, skipping the ones excluded, and merges them into a single payload with the key being the fields `property` attribute, taking into consideration `applyTo` if defined. If all is passed as true, it also grabs hidden and unmodified (clean) values.
Parameters:
Name Type Description
all Boolean True to also include hidden and unmodified values.
Overrides:
Source:
Returns:
A single object payload with all the values.
Type
Object

handleError(error)

Starts matching and executing errorHandlers.
Parameters:
Name Type Description
error Error Error to pass to the errorHandlers
Overrides:
Source:

hasAction(name, evt, node) → {Boolean}

Determines if a field has defined on it the supplied name as a function
Parameters:
Name Type Description
name String Name of the function to test for
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
If the field has the named function defined
Type
Boolean

hideConcurrencySummary()

Removes teh summary for concurrency errors
Overrides:
Source:

hideValidationSummary()

Removes the summary validation visible styling and empties its contents of error markup
Overrides:
Source:

init()

Extends init to also init the fields in `this.fields`.
Overrides:
Source:

initConnects()

Establishes this views connections to various events
Overrides:
Source:

initModel()

Initializes the model instance that is returned with the current view.
Overrides:
Source:

insert()

Called by save() when performing an insert (create). Gathers the values, creates the payload for insert, creates the sdata request and calls `create`.
Overrides:
Source:

invokeAction(name, parameters, evt, node) → {function}

Extends invokeAction to first look for the specified function name on the field instance first before passing it to the view.
Parameters:
Name Type Description
name String Name of the function to invoke
parameters Object Parameters of the function to be passed
evt Event The original click/tap event
node HTMLElement The node that initiated the event
Overrides:
Source:
Returns:
Either calls the fields action or returns the inherited version which looks at the view for the action
Type
function

isDisabled() → {Boolean}

Returns true if view is disabled.
Overrides:
Source:
Returns:
.
Type
Boolean

isFormDisabled() → {Boolean}

Determines if the form is currently busy/disabled
Overrides:
Source:
Returns:
Type
Boolean

load()

Called once the first time the view is about to be transitioned to.
Overrides:
Deprecated:
  • Yes
Source:

onActivate(self)

The onActivate event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionAway(self)

The onBeforeTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onBeforeTransitionTo(self)

The onBeforeTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onInsertCompleted(entry)

Handler for insert complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

onShow(self)

The onShow event.
Parameters:
Name Type Description
self
Overrides:
Source:

onToolLayoutCreated()

Called after toolBar layout is created;
Overrides:
Source:

onTransitionAway(self)

The onTransitionAway event.
Parameters:
Name Type Description
self
Overrides:
Source:

onTransitionTo(self)

The onTransitionTo event.
Parameters:
Name Type Description
self
Overrides:
Source:

onUpdateCompleted(entry)

Handler for update complete, checks for `this.options.returnTo` else it simply goes back.
Parameters:
Name Type Description
entry
Overrides:
Source:

open()

Available Options: horizontal: True if the transition is horizontal, False otherwise. reverse: True if the transition is a reverse transition (right/down), False otherwise. track: False if the transition should not be tracked in history, True otherwise. update: False if the transition should not update title and back button, True otherwise. scroll: False if the transition should not scroll to the top, True otherwise.
Overrides:
Source:

refresh()

Refresh first clears out any variables set to previous data. The mode of the Edit view is set and determined via `this.options.insert`, and the views values are cleared. Lastly it makes the appropiate data request:
Overrides:
Source:

refreshRequiredFor(options)

Extends refreshRequiredFor to return false if we already have the key the options is passing
Parameters:
Name Type Description
options Object Navigation options from previous view
Overrides:
Source:

requestData()

Initiates the request.
Overrides:
Source:

routeLoad(ctx, next)

Fires first when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

routeShow(ctx, next)

Fires second when a route is triggered. Any pre-loading should happen here.
Parameters:
Name Type Description
ctx Object
next function
Overrides:
Source:

save()

Handler for the save toolbar action. First validates the forms, showing errors and stoping saving if found. Then calls either insert or update based upon `this.inserting`.
Overrides:
Source:

setValues(values, initial)

Sets the given values by looping the fields and checking if the field property matches a key in the passed values object (after considering a fields `applyTo`). The value set is then passed the initial state, true for default/unmodified/clean and false for dirty or altered.
Parameters:
Name Type Description
values Object data entry, or collection of key/values where key matches a fields property attribute
initial Boolean Initial state of the value, true for clean, false for dirty
Overrides:
Source:

show(options, transitionOptions)

Shows the view using pagejs in order to transition to the new element.
Parameters:
Name Type Description
options Object The navigation options passed from the previous view.
transitionOptions Object Optional transition object that is forwarded to open.
Overrides:
Source:

showValidationSummary()

Creates the markup by applying the `validationSummaryItemTemplate` to each entry in `this.errors` then sets the combined result into the summary validation node and sets the styling to visible
Overrides:
Source:

startup()

When the app is started this fires, the Edit view renders its layout immediately, then renders each field instance. On refresh it will clear the values, but leave the layout intact.
Overrides:
Source:

transitionAway()

Called after the view has been transitioned (slide animation complete) away from.
Overrides:
Source:

transitionTo()

Called after the view has been transitioned (slide animation complete) to.
Overrides:
Source:

update()

Called by save() when performing an update (edit). Gathers the values, creates the payload for update, creates the sdata request and calls `update`.
Overrides:
Source:

validate() → {Array.<Boolean/Object>}

Loops and gathers the validation errors returned from each field and adds them to the validation summary area. If no errors, removes the validation summary.
Overrides:
Source:
Returns:
Returns the array of errors if present or false for no errors.
Type
Array.<Boolean/Object>