My apologies if the following is simple, but I am relatively new to 
Wicket (moving from Tapestry),  and wasn't  able to figure out an 
elegant solution:

I would like to add an Enum property to the Contact class of the 
wicket-phonebook application, say a Gender:

public enum Gender {

class Contact {
    private Gender gender;
    // getter and setter

The contact's gender should be shown as another 
ChoiceFilteredPropertyColumn of the DefaultDataTable on the ListContacts 
So far no problem.

Now I would like to localise the Gender type with a Gender.properties 
file on the Gender's class path.
This properties file would then be used for
1. the columns filter selection
2. the contact's gender field
3. the Gender column's row values.

This last one I could not figure out. I guess I am looking for a way to 
have the StringResourceModel  use  a ClassResourceLoader for the Gender 
class, but it does not seem to allow for this.

In the end I got it something working that makes use of keys in my 
application.properties (Gender.MALE, Gender.FEMALE) but I would prefer a 
separate properties file.

Best regards,

Wilko Hische

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Wicket-user mailing list

Reply via email to