Category Archives: Java

Two Guava Collections

Today I wrote two different Guava Collections as answer to two different StackOverflow Questions: Java data Structure and Comparator and equals() The first requested a Map where the keys are Enums and the values are sorted collections. In my answer, … Continue reading

Posted in Guava, Java | Leave a comment

Add system properties through spring XML configuration.

If you want to set system properties through XML configuration, here is a solution (inspired by this question): Use two MethodInvokingFactorybeans, one to statically access System.getProperties() and one to call properties.putAll(map) on these properties. Here’s the configuration: <bean class=”org.springframework.beans.factory.config.MethodInvokingFactoryBean”>   … Continue reading

Posted in Java, Spring | 2 Comments

Wicket behavior to guard changed form.

Triggered by the StackOverflow Question Wicket : Notify if page model has been changed., here is a wicket behavior that you can attach to a form and that will stop the user from leaving the site once he has changed … Continue reading

Posted in Java, Wicket | Leave a comment