                 when  'raw'
                      @.$('.results').html @json_to_tree @current_result
 
+            debugger
             @delegateEvents()
+
             return @
 
         toggle_collapse: (event) =>



        expand_tree_in_table: (event) =>
            dom_element = @.$(event.target).parent()
            data = dom_element.data('json_data')
            result = @json_to_tree data

        render: (query, result) =>
            if query? and result?
                @.$el.html @result_view.render(query, result).el
                @result_view.delegateEvents()
            else
                @.$el.html @default_view.render().el

