torso-bundle.js
function(args) {
      args = args || {};

      /* Listen to model validation callbacks */
      var FormModelClass = args.FormModelClass || this.FormModelClass || FormModel;
      this.model = args.model || this.model || (new FormModelClass());

      /* Override template */
      this.template = args.template || this.template;

      /* Merge events, fields, bindings, and computeds */
      this.events = _.extend({}, this.events || {}, args.events || {});
      this.fields = _.extend({}, this.fields || {}, args.fields || {});
      this._errors = [];
      this._success = false;
      // this._bindings is a snapshot of the original bindings
      this._bindings = _.extend({}, this.bindings || {}, args.bindings || {});

      View.apply(this, arguments);

      this.resetModelListeners(this.model);
    }
function(args) {
      args = args || {};

      /* Listen to model validation callbacks */
      var FormModelClass = args.FormModelClass || this.FormModelClass || FormModel;
      this.model = args.model || this.model || (new FormModelClass());

      /* Override template */
      this.template = args.template || this.template;

      /* Merge events, fields, bindings, and computeds */
      this.events = _.extend({}, this.events || {}, args.events || {});
      this.fields = _.extend({}, this.fields || {}, args.fields || {});
      this._errors = [];
      this._success = false;
      // this._bindings is a snapshot of the original bindings
      this._bindings = _.extend({}, this.bindings || {}, args.bindings || {});

      View.apply(this, arguments);

      this.resetModelListeners(this.model);
    }
function ( args ) { args = args || { } ; /* Listen to model validation callbacks */ var FormModelClass = args . FormModelClass || this . FormModelClass || FormModel ; this . model = args . model || this . model || ( new FormModelClass ( ) ) ; /* Override template */ this . template = args . template || this . template ; /* Merge events, fields, bindings, and computeds */ this . events = _ . extend ( { } , this . events || { } , args . events || { } ) ; this . fields = _ . extend ( { } , this . fields || { } , args . fields || { } ) ; this . _errors = [ ] ; this . _success = false ; // this._bindings is a snapshot of the original bindings this . _bindings = _ . extend ( { } , this . bindings || { } , args . bindings || { } ) ; View . apply ( this , arguments ) ; this . resetModelListeners ( this . model ) ; }
Validation error hash
@private
@property _errors
@type Object
 
Validation success
@private
@property _success
@type Boolean
 
Stickit bindings hash local backup
@private
@property _bindings
@type Object
 
Handlebars template for form
@property template
@type HTMLtemplate
 
Backbone events hash
@property events
@type Object
 
Two-way binding field customization
@property fields
@type Object
 
Stickit bindings hash
@property bindings
@type Object
 
The class to be used when instantiating the form model
@property FormModelClass
@type Torso.FormModel class extension
 
Constructor the form view object.
@method constructor
@param args {Object} - options argument
@param [args.model=new FormModelClass()] {Torso.FormModel} - a form model for binding that defaults to class-level
model or instantiates a FormModelClass
@param [args.FormModelClass=Torso.FormModel] - the class that will be used as the FormModel. Defaults to a class-level
definition or Torso.FormModel if none is provided
@param [args.template]  {HTML Template} - overrides the template used by this view
@param [args.events]    {Events Hash} - merge + override the events hash used by this view
@param [args.fields]    {Field Hash} - merge + override automated two-way binding field hash used by this view
@param [args.bindings]  {Binding Hash} - merge + override custom epoxy binding hash used by this view
Validation error hash