Members
-
errors :Array.<String>
-
-
template :function|String
-
Description
The template for this view, in general a function that accepts this view context object and returns an HTML string.
If it is a string an AMD module with that name is tried to be loaded.
If it is undefined the view will be rendered without errors as an empty stringDetails
-
error :WizardModuleError
-
Description
current module error if any
-
events :Object|Object
-
Details
-
bindings :Object
-
Details
Methods
-
clearError() → {undefined}
-
Description
clear all error messages being shown
Returns
-
clearGeneralMessages() → {undefined}
-
Description
clear all general messages being shown
Returns
-
showGeneralMessage( message, type ) → {undefined}
-
Description
Notify a message (not just an error) at step level. Type can be a boolean (true: for errors, false: for success) or string to add a class alert-
Parameters
Name Type Description messagestring typestring Returns
-
disableInterface()
-
Description
General method to disable the module interface called at the moment of submitting the step
-
enableInterface()
-
Description
General method to re-enable the module interface called after getting an ERROR on submitting
-
refresh()
-
Description
Auxiliary method to refresh a module. For example, iIt is implemented by the OrderWizard to refresh titles
-
initialize( ...options ) → {void}
-
Description
this is executed when a new view is instantiated - equivalent to the instance contructor.
Parameters
Name Type Attributes Description optionsany <repeatable> Returns
Details
-
submit() → {Deferred}
-
Description
by default, a module returns it's validation promise.
Returns
-
render() → {void}
-
Returns
Details
-
cancel() → {Deferred}
-
Returns
-
getContext() → {Object}
-
Description
Returns the object which will be consumed by this view's template
Returns
Details
-
isValid() → {Deferred}
-
Description
validate resolves a promise because maybe it needs to do some ajax for validation
Returns
-
destroy() → {void}
-
Returns
Details
-
isActive() → {Boolean}
-
Description
Determines is a module is active (can be submitted, rendered or just use) or not.
Returns
-
extend( view_definition )
-
Parameters
Name Type Description view_definitionView an object with some of this class members.
Details
-
getTitle() → {String}
-
Description
returns the title of the module, can be overridden in the configuration file.
Returns
-
manageError( error ) → {undefined}
-
Parameters
Name Type Description errorWizardModuleError Returns
-
showError() → {undefined}
-
Description
Shows the current error if any, see error
Returns