|
This is the
human recognizable label for the element, also used as part of the accessiblity
scheme. Within the content source, the convention is to used the label tag to
associate a caption to an element id.
<label for="categoryName">Category
Name</label>
The need to associate captions with elements in the descriptor, stems from the
fact that the services provided by the controller, like auto-population and
validation, could be performed iteratively over all fields in the transfer
object.
Whenever
there are errors, they would be accumulated into messages objects. These
errors could then be rendered as feedback to the users. The field names used in
transfer objects are not suitable in the provision of such feedback. They
should be replaced with captions that match those seen on the page.
Furthermore, there might be a need for internationalization of such messages.
The entry of these captions in the descriptor is one step toward achieving this
association of captions to fields. The next step is called externalization.
This is the process in which these captions would be replaced by keys that are
used throughout the application. For example, the key
"customerForm.customerId.label" would replace the caption "Customer Id" for
field "customerId". There are a lot of considerations that go into selecting a
scheme for the naming convention; this would be decided in the design process.
There are also restrictions on some platform on the use of non-alphabetic
characters, like period, in the keys.
For the specification using dWebSpec, the externalization key could be defined
for the caption, as shown below:
Original
String: Customer ID
The key
entry:
{customerForm.customerId.label}
The enclosure within braces, distinguishes externalized captions from
non-externalized ones.
|