I hope this is the right place to ask this question.
 
 Let's say I have the following class (using jdk 1.5):
 
 public enum UserType {
     MANAGER,
     SUPERVISOR,
     USER;
 }

 I can build a List of these types to display in an options tag easily enough:
 
 public List<ValueLabelPair> getUserTypes()
     throws Exception {
     List<ValueLabelPair> items = new ArrayList< ValueLabelPair>();
     for( UserType userType : UserType.values()) {
         items.add(new ValueLabelPair( String.valueOf(
userType.ordinal(), userType.name() ) ));
     }
     return items;
 }
 
 This works well, but what happens when I need to 'internationalize'
my app for other languages or want to display another 'name' instead
of the enum name without messing with my model? What would be the best
way to convert those display names if I stored the labels in a
MessageResources file?
 
Thanks very much.

-- 
Niall McLoughlin
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to