Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 19: Web Modeling

Enter the name and ID of the field.

4.

Select OK to create the new field.

5.

Right−click the new field.

6.

Edit the field specifications, event handlers, and round−trip engineering options on the specification window.

The field will be generated in the code as follows:

<textarea ID="TXT1" Name="TextArea1" Rows="4">

All of these types of fields (Input, Select, or TextArea) will appear as attributes of the form on which they are displayed. When code is generated, Rose will examine both the fields and their properties to determine what HTML to generate.

Relationships

Now that we have classes in the model, the next step is to add relationships. There are four primary types of relationships between web elements: link relationships, build relationships, redirect relationships, and submit relationships.

666

Chapter 19: Web Modeling

A link relationship is used to represent a hypertext link between two client pages or between a client page and a server page. The link is drawn as an association relationship between two classes, with a stereotype of <<Link>>.

To set the detailed specifications for the link, right−click the association and select Open Specification. Table 19.3 lists the properties of a link association.

Table 19.3: Link Relationship Attributes

Attribute

Specification Window

Meaning

 

Tab

 

AccessKey

General

Key that will set focus to the element

Class

General

Class name for element

Dir

General

Directional orientation

HREF

General

Link location

ID

General

Element name

Lang

General

Language of element's content

Name

General

Link destination

Style

General

Cascading style sheet for element

TabIndex

General

Tab order of the element

Target

General

Where the link displays in the browser

Title

General

Document referenced by HREF attribute

Onblur

Events

Process to run when element loses focus

Onclick

Events

Process to run on mouse click

Ondblclick

Events

Process to run on mouse double−click

Onfocus

Events

Process to run when element gains focus

Onkeydown

Events

Process to run when a key is pressed down

Onkeypress

Events

Process to run when an alphanumeric key is pressed

Onkeyup

Events

Process to run when a key is released

Onmousedown

Events

Process to run when the mouse button is pressed

Onmousemove

Events

Process to run when the mouse moves

Onmouseout

Events

Process to run when the mouse cursor is moved off of the

 

 

element

Onmouseover

Events

Process to run when the mouse cursor is placed on the element

Onmouseup

Events

Process to run when the mouse button is released

RTE Synchronization

RTE Options

Whether or not to generate the element

Resolve Relative

RTE Options

Automatically resolve paths in referenced files(Note: Setting

Paths Dynamically

 

this field to Default will set it to True/False, depending upon

 

 

what is set in Tools → Web Modeler → User Preferences.)

667