Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class MyComponent extends WebMarkupContainer {
    @OnAttach
    private void createRepeaterItems() {
        ...
    }
    @OnAttach
    private void createHeaderItems() {
       ...
    }
} 

XML resource bundles

In addition to the .properties format for localized messages, Wicket now supports Java 5's XML format for messages. Like with normal messages, you can just put them next to your component class with the proper locale in the name etc. For instance: MyPanel_nl.xml would be the Dutch language bundle next to MyPanel.class. The format is described in http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html the Javadocs of the Properties class. The greatest advantage is that you can declare which encoding should be used, thus enabling you to directly maintain your bundles for non-ASCII sets (with normal properties, you have to use escape codes for non-ASCII characters).