Archive for 27 August 2011

A case for declaring your variables as final in Java

I wrote a few months ago about Yoda conditions and using the final keyword. I recently came across a bug that would never have occurred if a final keyword was used. Consider the following code. I’ve simplified it to the point that a static map structure could be used, but that was not the case [...]

You can embed wicket:message in any HTML tag for easy internationalization in Wicket

Here’s a useful Wicket i18n tip to reduce the amount of code you need to write. Any HTML tag in your HTML template can have a wicket:message attribute added to it. This is especially useful in <a> and <input> tags. For example, if you want a tooltip to appear when you hover the mouse over [...]