Class Index | File Index

Classes


Class FormView


Extends Backbone.View.
FormView
Defined in: formview.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Comment form controller and view
Field Summary
Field Attributes Field Name and Description
 
CSS class name of the container element
 
The map of delegated event handlers
 
Html tag name of the container element that'll be created when initializing new instance.
Method Summary
Method Attributes Method Name and Description
 
Cancel button click handler Cleans up form view from DOM
 
View init method, subscribing to model events
 
Override the default view remove method with custom actions
 
Render form element from a template using Mustache
 
Submit button click handler Sets new values from form on model, triggers a success event and cleans up the form
 
Update view if the model changes, helps keep two edit forms for the same model in sync
Class Detail
FormView()
Comment form controller and view
Author: Bodnar Istvan .
Field Detail
{String} className
CSS class name of the container element

{Object} events
The map of delegated event handlers

{String} tagName
Html tag name of the container element that'll be created when initializing new instance. This container is then accessible via the this.el (native DOM node) or this.$el (jQuery node) variables.
Method Detail
{Boolean} cancel()
Cancel button click handler Cleans up form view from DOM
Returns:
{Boolean} Returns false to stop propagation

initialize()
View init method, subscribing to model events

remove()
Override the default view remove method with custom actions

{FormView} render()
Render form element from a template using Mustache
Returns:
{FormView} Returns the view instance itself, to allow chaining view commands.

{Boolean} submit()
Submit button click handler Sets new values from form on model, triggers a success event and cleans up the form
Returns:
{Boolean} Returns false to stop propagation

{Boolean} updateFields()
Update view if the model changes, helps keep two edit forms for the same model in sync
Returns:
{Boolean} Returns false to stop propagation

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jul 10 2012 11:17:08 GMT+0200 (CEST)