Class: SC.Controller


Extends SC.Object.

The controller base class provides some common functions you will need for controllers in your applications, especially related to maintaining an editing context.

In general you will not use this class, but you can use a subclass such as ObjectController, TreeController, or ArrayController.

EDITING CONTEXTS

One major function of a controller is to mediate between changes in the UI and changes in the model. In particular, you usually do not want changes you make in the UI to be applied to a model object directly. Instead, you often will want to collect changes to an object and then apply them only when the user is ready to commit their changes.

The editing contact support in the controller class will help you provide this capability.

Defined in: controller.js

Since:
SproutCore 1.0

Field Summary

Instance Methods

Field Detail

destroyContentOnReplace

Set this to YES if you are setting the controller content to a recordArray or other content that needs to be cleaned up (with .destroy()) when new content is set.

isEditable Boolean

Makes a controller editable or not editable. The SC.Controller class itself does not do anything with this property but subclasses will respect it when modifying content.

Instance Method Detail

contentObjectDidChanged()
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)