0 Replies Latest reply on Sep 28, 2009 5:25 PM by Thomas Hamacher

    s:selectItems and international labels

    Thomas Hamacher Novice
      Hi,

      I´ve got some basic problems, when trying to understand how to get the labels for my s:selectItems (for example in a h:selectOneMenu).

      This is, what I´d like to do: Let´s say I have a number of countries. These countries should be selected through a dropDown-List (as possible thorugh the selectOneMenu). Now I´d like to translate the entries through a MessageBundle for any different language. The examples using the label-attribute withing the selectItems only reference to an attribute within my entity. But how can I use the message-bundle? Initially I thought to use the attribute from my entity to resolve my messageBundle-key. For example, the Country with the isoCode "DE" should finally resolve in a key named 'country.DE'. Additionally I cannot see how to solve the problem when sorting those translated countries. If I translate them through my message-bundle the possibility that countries in different languages start with different letters is pretty high. So the sequence has to be 1. translate, 2. sort. Any chance to do this using this component or do I have to take a different approach in this case?

      Finally: When I used trinidad I used a Map<String, Country> with the tr:selectOneChoice and the f:selectItems. Is there any chance to use a Map with s:selectItems or is this limited to a List, Set, DataModel or Array?

      Thanks
      Thomas