Announcement Announcement Module
Collapse
No announcement yet.
Enums and I18N Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enums and I18N

    Hi, everyone!

    A question regarding Enums and I18N. I have a multilanguage rich client application and wish that my users see data in combo boxes in their own language.
    My enums are defined together with the model, i.e. in the middle layer, like

    Code:
    public class SpolEnum extends StringCodedLabeledEnum {
        public static SpolEnum SPOL_MUSKI = new SpolEnum("M", "Muški");
    ...
    }
    Having read the code of org.springframework.richclient.list.LabeledEnumLis tRenderer, I've seen that my enums should implement org.springframework.context.MessageSourceResolvabl e to be displayed in combo boxes taking into account localized labels.
    It seems to me like pollution of my model, but if there is no other way, let it be...

    Did anyone implement it likewise? Any hint? How to specify keys in message.properties?

    Thanx,

    neunistivlija

  • #2
    I am using 1.5 enums and somewhere in this forum is the code how to i18n those... maybe that codes helps?

    Comment


    • #3
      Thanx, ge0ffrey, you gave me an idea: I will override ComboBox renderer and editor for enums so they shows properties for my enum values.

      Comment

      Working...
      X