Event Elements
- <do> tag - The <do> tag is a card-level user interface. It serves as a general mechanism for the user to activate a task, typically performed by the user clicking on a word or phrase in the display. A task is performed in response to an event. There are four tasks in WML: go, noop, prev, and refresh.
The mandatory type attribute provides information about the intent of the element, helping to improve processing. If the 4620 web browser does not recognize the specified type, (e.g., testing, experimental, and vendor specific types), the specified type is treated as unknown. The browser only renders WML 1.2 tags. Any other tags will cause an error and the user will receive an error statement “not a valid wml page”.
Attribute |
Value |
Description |
Comments |
type |
accept prev help reset options delete unknown x-* vnd.* |
REQUIRED. Defines the type of the “do” element |
SUPPORTED |
label |
cdata |
Creates a label for the “do” element |
Optional; creates a string label for the element. The 4620 browser imposes a six character limit. SUPPORTED |
name |
mmtoken |
Defines a name for the “do” element |
SUPPORTED |
optional |
true false |
If set to true, the browser ignores this element. If set to false, the browser does not ignore this element. Default is “false” |
Optional. SUPPORTED |
Type |
Description |
Comments |
accept |
Acknowledgement of acceptance |
SUPPORTED |
delete |
Delete item |
SUPPORTED |
help |
Request for help |
SUPPORTED |
options |
Options or additional operations |
SUPPORTED |
prev |
Backward navigation |
SUPPORTED |
reset |
Clearing or reset |
SUPPORTED |
X-*n or x-*n |
Experimental |
SUPPORTED, but treated as ‘unknown’ |
<do> tags are rendered as softkey labels on the bottom line of the 4620 display. <do> tags are specified per WML page and therefore are page context-sensitive. The eight “do” types are labeled either specifically in a WML page or by a browser-dependent label.
If no labels are given, then the “do” types will have the following default labels:
Type |
Default Label if no label specified |
accept |
ACCEPT |
delete |
DELETE |
help |
HELP |
options |
OPTIONS |
prev |
BACK |
reset |
RELOAD |
X-*n or x-*n |
UNKNOWN |
Vnd* Any mix of upper or lower cases |
AVAYA (Available for future use, but currently UNKNOWN) |
If no <do> tags have been specified, no softkeys will be displayed:
If one <do> tag is specified the following softkeys will be displayed:
If multiple <do> tags are specified, display them as follows:
1st DO |
2nd DO |
3rd DO |
MORE |
Page 1 Softkeys:
1st DO |
2nd DO |
3rd DO |
MORE |
Page 2 Softkeys:
NOTE:
|
If more than one page of softkey labels are specified, pressing the MORE softkey automatically presents the user with the next page of labels. If the last page displays and the user presses the MORE softkey, the first page of labels is then displayed. As implied by the above, the softkey buttons are labeled in sequential order of the <do> tags.
|
- <onevent> tag - The onevent tag serves as a container for code that you wish to be executed automatically when one of the four intrinsic events occurs. The onevent element is said to bind (associate) the tasks (code) to the event for the element. The intrinsic event must be specified using the mandatory type attribute.
For example, when a user presses the BACK softkey, instead of being routed to the previous screen, the user will be directed to another specified page because this tag carries out a onevent backward event.
The intrinsic events are:
Event |
Permitted Tags |
Description |
onenterbackward |
card or template |
Occurs when a <prev> navigates back onto a card. SUPPORTED. |
onenterforward |
card or template |
Occurs when a <go> navigates into a card. SUPPORTED |
onpick |
option |
Occurs when an item is selected/unselected by a user. SUPPORTED |
ontimer |
card or template |
Occurs when the time expires. SUPPORTED |
The template element creates code that is inserted into all cards in a single deck. The nested tags are as follows, go, noop, prev, and refresh.
There are no visual implications for supporting the <onevent> tag.
Attribute |
Value |
Description |
Comments |
type |
onenterbackward onenterforward onpick ontimer |
REQUIRED. Specifies the type of the “onevent” element |
SUPPORTED |
- <postfield> tag - The postfield tag is used to set a name/value pair that can be transmitted to an origin server (source of the request) during a URL request. The name is set by the name attribute and must be a valid WML variable name. The value is set by the value attribute. There are no visual rendering implications with this tag.
Attribute |
Value |
Description |
Comments |
name |
cdata |
REQUIRED. The name of the field |
SUPPORTED |
value |
cdata |
REQUIRED. The value of the field |
SUPPORTED |