Description
An AmlStyle object is used to change the way another AML element is rendered. A style will be applied when a condition you specify (a protocol or device) is present. Styles can have a wide range of effects on elements in their scope. AmlStyle elements can have a StyleId, be stored in libraries, and invoked by the developer. They may also be Inline and defined when used.
Element Body
((AmlContainer*, (AmlText | AmlImage)?, AmlStyle?)
Parent
AmlDocument, AmlPage, AmlChoice, AmlOption, AmlForm, AmlTable, AmlTableRow, AmlTableCol, AmlInput, AmlLink, AmlControlMenu, AmlCheckBox, AmlText, AmlImage, AmlGroup, AmlListItem, AmlSelectListItem, AmlOrderedList, AmlList, AmlSelectList, AmlSpace
Restrictions
None
AML Attributes
Attribute |
Description |
Possible values |
Default |
Req’d? |
---|---|---|---|---|
dpo |
Set dpo |
CDATA |
No Default |
No |
protocol |
Set protocol |
CDATA |
No Default |
No |
device |
Set device type. |
CDATA |
No Default |
No |
styleid |
Set styleid in style library |
CDATA |
No Default |
No |
inlinestyle |
Set inlinestyle |
CDATA |
No Default |
No |
Markup Language Examples
The AML input example that follows happens to use cHTML as the protocol. Therefore, the use of the AmlStyle element in this example affects the cHTML output but not the WML output as demonstrated in the output examples.
For information about all the supported protocols and the corresponding devices, access the Client Manager page using the Identity Server administration console.
To Access the Client Manager
Log in to the Access Manager administration console as the administrator.
By default, Identity Management is selected in the Header frame (the top horizontal frame).
Click the Service Configuration tab.
A list of services appears in the Navigation frame (the left vertical frame).
Scroll down the Navigation frame and click the arrow for Client Detection.
The Client Detection page appears in the Data frame (the right vertical frame).
Click the Edit link.
The Client Manager window appears. From this window you can select a markup language to view a list of supported devices.
Sample AML Input:
<AmlDocument title="Style Test"> <AmlPage title="Using Styles"> <AmlForm url="Next"> <AmlInput name="user"> <AmlText text="Username"/> <AmlStyle protocol="CHtml" inlinestyle=’< Input type="timepicker" name=".:name" size=".:width" />’/> </AmlInput> </AmlForm> </AmlPage> </AmlDocument>
Sample WML Output:
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head><meta http-equiv="Cache-Control" content="max-age=0"/></head> <card id="agp0"> <p align="center">Using Styles</p> <p>Username<input emptyok="true" name="user"/></p> <do label="submit" type="accept"><go href="Next?user=$(user)" sendreferer="true" method="get"/></do> </card> </wml>
Sample cHTML Output:
<html> <head> <title>Style Test</title> <meta name="PalmComputingPlatform" content="true"></meta> <meta http-equiv="Pragma" content="no-cache"></meta> <meta http-equiv="Cache-Control" content="no-cache"></meta> </head> <body> <div align="center"> <a name="agp0">Using Styles</a> </div> <form enctype="application/x-www-form-urlencoded" action="Next" method="get"> <input name="user" type="timepicker"></input> Username<br> <input name="request" type="submit" value="Submit"></input> </form> </body> </html>