The clj-vaadin <https://github.com/hsenid-mobile/clj-vaadin> project is wonderful, it is very useful for me. It has an example of making a tree with vaadin with 2 levels. Do you know how I can add a third and fourth level?
(defn level2 [tree n1 n2] (reduce (fn [tree n2] (doto tree (.addItem n2) (.setParent n2 n1) (.setChildrenAllowed n2 false))) tree n2)) (defn level1 [tree [n1 n2]] (.addItem tree n1) (if (empty? n2) (.setChildrenAllowed tree n1 false) (do (level2 tree n1 n2) (.expandItemsRecursively tree n1))) tree) (defn nomina-tree [] (let [tree (Tree. "Index book")] (reduce level1 tree index))) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en