Cleanly handle exceptions in tests with Lambdas

If you have been writing tests for some time then the following construct should be pretty familiar to you for handling test cases: @Test public void myTest() { // Test something here... try { // Test something that will throw SomeException Assert.fail("Test did not throw expected exception."); } catch (SomeException e) { // Expected } // Test something here... } This has annoyed me some time already as it makes a clean looking test just plain ugly and I have been looking for a way to clean this mess up. You might at this point now argue that you could split the test up in smaller blocks and »

EOL for Vaadin addons

I have been supporting many of my Vaadin addons I have contributed to the open source community for a long time (some soon over half a decade) and currently I find I have no longer the time or energy to keep them up to date with Vaadin releases. The following addons will be effected: FlashCanvas DragDropLayouts QRCode VBug UIDLCompressor TwitterQueryContainer SimpleCalendar RemoteConnection ObservableListContainer If you have used one of the following addons then feel free to continue using it but don't expect any new updates. By terminating support for these addons it will free up time for me to concentrate »

Building Spring Boot Vaadin applications with Gradle

Alright, so you have been bitten by the Spring Boot bug and want to write your Vaadin applications using Spring Boot and Gradle. How would you get started? 1. Create a Gradle Spring Boot project First off create a standard Gradle project with a build.gradle file and nothing else and add the following to build.gradle: // build.gradle plugins { id 'fi.jasoft.plugin.vaadin' version '1.1.2' id 'org.springframework.boot' version '1.4.4.RELEASE' } dependencies { compile 'com.vaadin:vaadin-spring-boot-starter:2.0-SNAPSHOT' } jar { baseName = 'myapp' version = '0.0.1-SNAPSHOT' // To include resources from webapp from 'src/main/ »

Injecting CDI managed beans into Quarz jobs

Quarz Job Scheduler If you have worked with enterprise applications in the past you have most likely at some point in time needed to schedule some jobs to run at either some interval or possibly at some specific point in time. One of the go-to solutions to do this has for a long time been using the Quarz Job Scheduler. Here is an example of a typical Quarz job you might create: class MyJob implements Job { @Override void execute(JobExecutionContext context){ // Execute some code } } and then in your application you would schedule it pretty much like this class MyApp { void »

Converting a Vaadin Maven project to Gradle

So you started out with creating a new Vaadin project in Eclipse and it created a Maven project and after a while you have noticed it isn't working out for you and want to switch to Gradle to make your life easier. The good news is that Gradle provides great tooling for upgrading your project from Maven to Gradle and with the Gradle Vaadin plugin you will be happily running with Gradle in no time. To demonstrate the approach I have taken the Vaadin Spreadsheet tutorial provided by Vaadin over at https://github.com/vaadin/spreadsheet-tutorial. It is a typical »