Entries with tag scala scaladin .

Scaladin 1.0 released

Scala is a programming language with functional and object-oriented aspects. It runs on JVM and interoperates with Java, which means that you can use Scala to create applications with Vaadin.

In addition to the necessary Java, Scala and Vaadin libraries, you don't need anything extra to develop Vaadin applications with Scala. However, with the release of Scaladin 1.0 (formerly known as scala-wrappers), using Vaadin with Scala is even easier. For example, Scaladin extends Vaadin components to provide constructors with named parameters to easily initialize a component with a single line. It also facilitates using Vaadin listeners with Scala. A full list of features in Scaladin 1.0 is available.

Here is a short example of what Vaadin UI code created with Scaladin can look like:

val layout = new VerticalLayout(width = 100 pct, height = 100 pct) {
  add(new Label(content = "Persons", style = Reindeer.LABEL_H1))
  add(new Table(width = 100 pct, height = 100 pct), ratio = 1)
  add(new HorizontalLayout(spacing = true) {
    add(new Button("Edit selected", _ => editClicked()))
    add(new Button("Add new", _ => addNewClicked()))
  })
}
getMainWindow.setContent(layout)

 

For more information about Scaladin, take a look at the project's GitHub page. The JAR file and a Maven dependency can be found from the Vaadin Directory. Example applications created with Scaladin include the Address Book and Document Manager. For information on setting up a project with Vaadin and Scala, check out the instructions in the Vaadin wiki.