Sun Java System Portal Server Mobile Access 7.1 Developer's Reference

AmlOption

Description

An AmlOption can be added to an AmlChoice list. When added, the AmlOption becomes the bottom member of the list.

Element Body

((AmlContainer*, (AmlImage | AmlText)?, AmlStyle? )

Parent

AmlChoice

Restrictions

None

AML Attributes

Attribute  

Description  

Possible values  

Default  

Req’d?  

url 

Set url for option 

CDATA 

No Default 

No 

value 

Set the value for the option 

CDATA 

No Default 

No 

selected 

Set as selected among several options 

(true|false) 

false 

No 

italics 

Deprecated

(true|false) 

false 

No 

bold 

Deprecated

(true|false) 

false 

No 

underline 

Deprecated

(true|false) 

false 

No 

text 

Set text for the option 

CDATA 

No Default 

No 

textsize 

Deprecated

Deprecated 

normal 

No 

Markup Language Examples

Sample AML Input:

<AmlDocument title="Option Test">
	<AmlPage title="Choices">
		<AmlForm url="resources">
			<AmlChoice name="c1">
				<AmlOption value="o1" text="o1"/>
				<AmlOption value="o2" text="o2"/>
			</AmlChoice>
		</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">Choices</p>
		<p mode="nowrap">
			<select multiple="false" name="c1">
			<option value="o1" title="select">o1</option>
			<option value="o2" title="select">o2</option>
			</select>
		</p>
		<do label="submit" type="accept">
			<go href="resources?c1=$(c1)" sendreferer="true" method="get"/>
		</do>
	</card>
</wml>

Sample cHTML Output:

<html>
	<head>
		<title>Option 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">Choices</a>
		</div>
		<form enctype="application/x-www-form-urlencoded"
		action="resources" method="get">
			<select name="c1">
			<option value="o1">o1</option>
			<option value="o2">o2</option>
			</select>
			<br>
			<input name="request" type="submit" value="Submit"></input>
		</form>
	</body>
</html>