-
Notifications
You must be signed in to change notification settings - Fork 4
-
AddSubView is used to render and add a subview to an parent view. If you need to perform some work after the view is added to the DOM you can implement a 'onShow' function. This will also trigger a 'shown' event.
Name Type Description optionsobject An option object with a view and a selector
- Source:
-
Remove all subviews and safely remove this view from the DOM. Implement an 'onClose' function for any additional clean up that is required before removing the view from the DOM. This will trigger a 'closed' event just before removing from the DOM.
- Source:
-
Helper function to return the attribute of a model if the model is assigned
- Source:
-
Retrieve the current number of sub views.
- Source:
-
Use getView to retrieve the primary subView
- Source:
-
RemoveSubViewForModel will close the first sub view that has the attched model. As a result a 'closed' event will be fired for the view and it will be removed from the DOM.
Name Type Description modelobject The model associated with the view
- Source:
-
Removes all sub-views from a parent
- Source:
-
ViewManager has a default render function that will render if there is a template function defined in the view. If serializeData is implemented its' return value will be passed to the template funcion otherwise this will be passed.
Implement an 'onRender' function to extend the render functionality. It returns 'this' to support chaining. This will trigger a 'rendered' event.
By setting attachToTemplate render will attach the view to the top element of the template. Using this option will remove the default behavior of Backbone that creates all views with a default div tag.
- Source:
-
RestoreSubViews can be used to restore views to the DOM that have been removed as a result of the parent view rerendering
- Source:
-
Return all the fields and their value of a form as an object
- Source:
-
Use setView to replace the entire contents of the view with a new view. this function will also remove all views currently contained within the view. This will trigger a 'shown' event.
Name Type Description viewBackbone.View The view to use
optionsobject Set options.emptyDOM to true in cases where the DOM that the view is attached is managed by something other than Backbone
- Source:
generated with docme