
34 vFoglight
Web Component Guide
2
Click the Add button.
The New View dialog opens.
3
Click Common > Label in the Blank view drop-down list, and then click OK.
The Module Definitions pane changes to an editor pane.
4
Only the component’s name and its Label property are required to have a
functioning component. The next few sections give a brief description of each tab
in the Definitions Editor.
The General Tab
The settings on the General tab are described in “General Tab” on page 108, but for now
just note that fields with required settings are marked with an exclamation icon ( ),
while others can retain their default values. The label must be given a name and a size. It
should be given a description in the Comments field that gives an indication of why it is
being used. Because this simple component will in all probability be added to a page, its
purpose should be set to Pagelet. Its roles, which are matched to user roles to control
who is allowed to see the component, need not be considered in this introductory
example. When this page is filled in, the component has a name, a preferred size, a
description, some allowed roles, and some purpose or purposes.
The Context Tab
In the Web Component Framework, context is analogous to the environment
information available to applications running under the control of an operating system.
Context is the collection of available information that can be copied and passed on to
the component. This information may be needed by the component to properly fulfill its
purpose.
The Configuration Tab
The Configuration tab is where the label’s properties are set. A primary goal of this
example is to give an overview of the possibilities available to users to bind data to a
component, so the next section discusses these possibilities as they apply to each of the
label’s properties.
Binding Data to a Component
To blend well with other components on a page, a view component needs to have
configurable properties that control its appearance. To be useful, a view component
must have mechanisms for data binding. The Web Component Framework supports
dynamic configuration for both appearance and data display.
Komentarze do niniejszej Instrukcji