Posts By: Freya

Freya

Senior Software Engineer developing all kinds of stuff.

Blaze rule engine: LocalDate

Using LocalDate with Blaze rule engine can be not so obvious sometimes, so here’s an example of a rule that calculates a period interval of 5 months:

Spring MVC: how to build a thread-safe Controller

Controllers in Spring MVC are designed to be shared between requests. Each controller has a default singleton scope so if you are using controllers you need to be aware of that. The easiest way to make sure your controller is thread-safe is to avoid class variables. F.ex. this example from Spring MVC tutorial:

Hibernate: how to enable show sql

To see the SQL that your application sends to the database during the execution, insert the following property in your XML property file:

JSP tutorial : custom format

I’ve come around a problem when I needed to format DateMidnight date in JSP. Here I’ll explain 2 ways of doing this, where the other one applies only to joda.

Flex: force focus on parent change

I was trying to solve a problem of resetting a focus if the parent changes. I had different buttons that show the same .mxml-form but with different data. The problem was that I needed the focus to be on the first date-field whenever the form is shown so that the user can begin typing data right away.

Flex dynamic ComboBox

I’ve recently  come to an issue where I needed a ComboBox in Flex with dynamic dataProvider and couldn’t work it around for a while. There is a bug in SDK 3.5 so that a dropdown list in a combobox shows old values after change of dataProvider. To overcome a problem you need to bind the dataProvider.