SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 233 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


For example, in my first Tapestry project I wanted to create a drop-down list, like
above, but containing all (well, most) countries of the world. That application was
bi-lingual, English and German, so the application was required to display the
countries' names in one of these languages depending on the current locale.
Internationalization and Localization
[ 192 ]
At that time enumerations didn't exist in the Java language, and anyway, it would
be hardly reasonable to create an enumeration with so many options in it. I had the
lists of countries in XML files and I was going to use the JDOM library for easy XML
manipulation. All I needed was to get a proper XML file for the current locale. So I
simply named the list in German as countries_de.xml and left the list in English
as the default, countries.xml. Then I put both files into the assets directory and
retrieved them when needed. Tapestry always gave me the correct file depending on
the current locale.
You might say here that we don't know enough about Select components yet in
order to fill a drop-down list with an arbitrary content, but this is the gap we are
going to close in the next chapter. For now, let's have a look at what we have learned
so far.


Pages:
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6