First thing that we need to do to get things started is to create a servlet clojure file which will load the Vaadin application.
(ns example.vaadin-servlet (:gen-class :extends com.vaadin.terminal.gwt.server.AbstractApplicationServlet :name example.VaadinServlet)) (defn ^Class -getApplicationClass [this] example.VApp) (defn ^hms.appstore.ui.main.VApp -getNewApplication [this request] (example.VApp.))
This will be the servlet that you will add into the web.xml keep in mind the java class name will be example.VaadinServlet.
Next is to create the Vaadin Application which would look something this.
(ns example.vapp (:gen-class :extends com.vaadin.Application :name example.VApp :init cjinit)) (defn -cjinit [] [[] (ref {})]) (defmacro window [name caption container & body] `(let [caption# ~caption container# ~container ~name (com.vaadin.ui.Window. caption# container#) ~(symbol (str name "-" "container")) container#] ~@body)) (defn -init [this] (println "=== Initiating Vaadin Application ==") (let [comps (transient {})] (window w "Clojure Vaadin Application" (com.vaadin.ui.VerticalLayout) (.setSizeUndefined w-container) (.setMainWindow this w) (let [layout (com.vaadin.ui.VerticalLayout.)]) (.addComponent w-container layout) (.addComponent layout (com.vaadin.ui.Label. "Test Message")))))
Thats all. I have used a macro for the window can do without that as well.
I have to appreciate you for your great work which you had done in your blog.i want you to add more like this.
ReplyDeleteJAVA Training in Chennai
JAVA Training in Tnagar
Selenium Training in Chennai
Digital Marketing Course in Chennai
Python Training in Chennai
Big data training in chennai
JAVA Training in Chennai
Java Training in Velachery
IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.
DeleteIEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.
corporate training in chennai corporate training in chennai
corporate training companies in india corporate training companies in india
corporate training companies in chennai corporate training companies in chennai
I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai
"I have read so many articles or reviews however this blog post is genuinely a pleasant article, keep it up. .
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
"
I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
ReplyDeleteBig Data Hadoop Training In Chennai | Big Data Hadoop Training In anna nagar | Big Data Hadoop Training In omr | Big Data Hadoop Training In porur | Big Data Hadoop Training In tambaram | Big Data Hadoop Training In velachery
Thanks for sharing in this blog...its very useful for us...keep on going…
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
Bitsum Process Lasso 11 offers a pro unique process optimization technology called ProBalance. Process Lasso will improve your PC's responsiveness.Process Lasso Pro 11.1.0.34 + Full Crack Download
ReplyDelete