Introduction

As described in the previous chapter, a developer defines a Cúram application page using UIM, but the page is displayed in a user's web browser using HTML. The label of a field is presented the same way for all fields, but the HTML that presents the value of each field differs depending on two factors: the mode of operation of the field and the type, the domain definition, of its value.

There are two modes of operation: the view mode and the edit mode. In the view mode, the user cannot modify the value of the field. The user may see the value presented as just text, or presented more elaborately as a bar chart or a rate table, depending on the type of the value. In the edit mode, the user can enter a new value or modify the existing value of a field. The user may see the value presented in a simple text input field, or a date selector or a check-box, again depending on the type of the value.

For each mode of operation and type of data, a specialized component is invoked by the CDEJ to render the HTML for a field's value. This HTML is included into the full HTML page and the page is returned for presentation to the user by the web browser. Often, other resources, such as icons and JavaScript, are required to complete that presentation. These specialized rendering components together with their associated resources are called widgets. Thus, there is a date selector widget, a text field widget, a bar chart widget, and many other widgets. The CDEJ provides a comprehensive set of widgets for all modes of operation and types of data. These are detailed in the " Domain Specific Controls " chapter of the Cúram Web Client Reference Manual and further in this guide in Configuring Renderers.

When rendering a complete UIM page at run-time, the CDEJ automatically identifies the mode and type of each UIM FIELD and selects the appropriate widget to render the value. The mode of operation is determined by the presence or absence of a TARGET connection on that field. When that connection is present, the field is in the edit mode; when it is absent, the view mode. The type of a field is determined by the domain definition of the server interface property to which that field is connected. What widget is "appropriate" for any given combination of mode and type is defined by configuration. A configuration file associates widgets with named domain definitions. For each domain definition, the widget to be used for each mode is specified. The CDEJ will use a widget so configured whenever it needs to render the value of a field with a matching mode and domain definition.

The configuration used by the CDEJ to associate widgets with domain definitions is the same configuration used to associate custom converter and comparator plug-ins with domain definition. The development and configuration of these plug-ins are described in the " Custom Data Conversion and Sorting " chapter of the Cúram Web Client Reference Manual. Custom widget development involves the development and configuration of new types of plug-ins that are configured in the same way. The widget developer can define a configuration within the application that overrides the default configuration of the CDEJ to customize the associations between widgets and domain definitions and change how the values of fields are presented. In order to do this, the widget developer must first understand the relationship between widgets and domain-specific plug-ins.