 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Views
 
+(defn entry-view [entry owner]
+  (reify
+    om/IRender
+    (render [_]
+      (html
+       [:li.list-group-item {:on-click (fn [] (select-entry entry))
+                             :style {:cursor "pointer"}} (:name entry)]))))
+
 (defn application [cursor owner]
   (reify
     om/IWillMount

  (fn [event msg app owner] event))

(defmethod handle-event :list [_ msg app owner]
  (om/update! app :data msg))

(defmethod handle-event :default [_ msg app owner])


                  "command" "list"} (create-handler :list cursor owner)))
    om/IRender
    (render [_]
      (let [current (:selected cursor)]
        (html
         [:div.container
          [:div.page-header
           [:h1 (:title cursor)]]
          [:h3 (:name current)]
          [:div.list-group
           (om/build-all entry-view (:children current))]])))))

(defn main []
  (setup-connection)
