User's Manual

Chapter 4. WAF Component: Services 15
introduced to the market. Rather than requiring programming for this straightforward functionality,
WAF provides the formbuilder service.
The formbuilder service enables non-technical users to build such applications via a web inter-
face, without any programmer intervention. The formbuilder service provides a variety of widgets
to choose from, such as a date widget which makes the part of the HTML form that allows you to
specify a date. Validation code is automatically attached to the date widget to ensure that only valid
dates are entered. Various widgets are provided for entering simple strings, numbers, etc.
Once the user has defined the required fields for their custom new document type, the system automat-
ically allocates structured storage in the database. From this point on, other users may enter documents
that require the specified fields to be filled in. Such documents are displayed in the tabular format:
Product name gizmo
Company name Acme, Inc.
Description This gizmo slices, dices, and juliennes.
Date introduced July 22, 1999
Table 4-1. Sample structured document
4.4. Globalization Service
A globalized application is one that tries to equally accommodate readers of different languages and
dialects. Elements of the application’s user interface are shown in the user’s preferred language, if it is
supported. For example, a link to the categories page is displayed as Categories for English speakers
and Kategorien for German speakers.
A partial list of globalization and localization facilities supported by the Java language includes:
The notion of locale (http://java.sun.com/j2se/1.3/docs/api/java/util/Locale.html).
Resource bundles (http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html) allow you
to organize and maintain locale-specific objects, such as strings to be shown as button labels, e.g.
Categories and Kategorien.
Locale-specific date format (http://java.sun.com/j2se/1.3/docs/api/java/text/DateFormat.html\ #get-
DateInstance(int,java.util.Locale) "\" has been inserted to show where the line was broken for
printing purposes; you will need to put both halves together again in e.g. your Web browser URL
window).
Locale-specific collation (http://java.sun.com/j2se/1.3/docs/api/java/text/Collator.html) of
sequences of strings.
Miscellaneous other facilities.
The WAF globalization service provides classes and methods that can be roughly divided into the
following three categories.
1. Convenient wrappers around most-frequently used Java globalization APIs, such as resource
bundles.
2. Means of configuring the list of supported languages, locales, and character sets.
3. A mechanism for locale and character set negotiation.
Most modern browsers allow users to select their preferred language or a ranked sequence of
preferred languages. The globalization service looks at the user’s preferred language and locale,