     createContextMenu: (node) =>
       data = node.original
       menu = {}
-
-      if data.type != "collection"
-        menu["remove"] = {label: "Remove"}
-
       menu
 
     renderTree: () ->
-      $('<div/>').jstree
+      tree = $('<div/>')
+
+      tree.on 'changed.jstree', (event, data) =>
+        for i in [0...data.selected.length]
+          ref = data.instance.get_node(data.selected[i]).data.ref
+
+          if ref?
+            obj = @resolve_ref(ref)
+
+            if obj instanceof ColumnDataSource.Model and @mget("data_widget")?
+              @mget_obj("data_widget").set_obj("source", obj)
+
+      tree.jstree
         core:
           data: @createTree()
           themes:


      @_base

    delegateEvents: (events) ->
      super(events)


          "<span style=\"color:#{color}\">#{value}</span>"
        ])

      @node(html.join(""), obj, icon, children)

    isRef: (obj) ->
      _.isObject(obj) and (_.isEqual(_.keys(obj), ["id", "type"]) or
