Directory

← Back

groovy-vaadin

Vaadin Groovy Integration

Author

Contributors

Rating

It allows you to write your Vaadin application in Groovy!

The sweetest feature is you can change it on fly – your script will be reloaded and recompiled on the next request.

All magic is in one class – GroovyApplicationServlet.

Sample code

    <servlet>
        <servlet-name>GroovyVaadin</servlet-name>
        <servlet-class>org.groovyvaadin.GroovyApplicationServlet</servlet-class>
        <init-param>
            <param-name>application</param-name>
            <param-value>xyz.YourApplication</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>GroovyVaadin</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
package xyz

import com.vaadin.ui.*
import com.vaadin.ui.Button.ClickListener

class YourApplication extends com.vaadin.Application {

  void init() {
    def window = new Window("Hello Vaadin!", new SplitPanel(SplitPanel.ORIENTATION_HORIZONTAL))
    setMainWindow window

    def label = new Label("Vaadin Groovy Integration", Label.CONTENT_RAW)
    window.addComponent label

    def button = new Button("Click!")
    window.addComponent button

    setTheme "runo"
  }
}
        <init-param>
            <param-name>scriptsPath</param-name>
            <param-value>/yourScriptsPath</param-value>
        </init-param>

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2010-02-10
Maturity
EXPERIMENTAL
License
Other

Compatibility

Framework
Vaadin 6.2+
Browser
N/A

groovy-vaadin - Vaadin Add-on Directory

Vaadin Groovy Integration groovy-vaadin - Vaadin Add-on Directory
It allows you to write your Vaadin application in Groovy! The sweetest feature is you can change it on fly – your script will be reloaded and recompiled on the next request. All magic is in one class – GroovyApplicationServlet.
Online