rishson/dojoEnterpriseApp — pull request #49 by st3redstripe (2012-08-09 17:36:19+00:00)
Title: Recursively un-autowire and destroy all widgets upon orphaning a widget

Changes to _Controller
* The controller now keeps a hash of handles and topic names when this.subscribe is called

Changes to ControllerWidget
* Helper methods addView and addModel now decorate the objects with their types, similarly upon creating a controller, it decorates itself with the controller type. This is used to determine the type of object during teardown.

Changes to Base
* orphan no longer calls dojo's destroyRecursive
* orphan now calls its destroyDescendants method to ensure that orphan is subsequently called on all of its children
* Within orphan, if the caller is a controller then _unAutoWirePubs is called to remove any subscriptions from the widget it is orphaning