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

AmlCheckBox

Description

An AmlCheckBox element is either selected or not selected. The name attribute’s value holds the variable name for the boolean value. The AmlCheckBox element can be added to an AmlForm object.

Element Body

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

Parent

AmlForm, AmlTableCol, AmlGroup, AmlListItem

Restrictions

None

AML Attributes

Attribute  

Description  

Possible values  

Default  

Req’d?  

name 

Boolean variable holding value 

CDATA 

No Default 

Yes 

selected 

Selection status 

(true|false) 

false 

No 

select_label 

Label for selected form input 

CDATA 

No Default 

No 

unselect_label 

Label for unselected form input 

CDATA 

No Default 

No 

view 

Set view option 

(show|hidden|none) 

show 

No 

persist 

Set persist flag 

(true|false) 

false 

No 

italics 

Deprecated

(true|false) 

false 

No 

bold 

Deprecated

(true|false) 

false 

No 

underline 

Deprecated

(true|false) 

false 

No 

text 

Deprecated

CDATA 

No Default 

No 

textsize 

Deprecated

(big|normal|small) 

normal 

No 

value 

Value used as form input 

CDATA 

No Default 

No 

Markup Language Examples

Sample AML Input:

<?xml version="1.0" encoding="ISO-8859-6"?>
<AmlDocument>
	<AmlPage>
		<AmlForm url="nextAction">
		<AmlCheckBox name="midp">
		<AmlText text="MIDP"/>
		</AmlCheckBox>
		</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"></p>
		<p mode="nowrap">
		MIDP
		<select name="midp" value="no"> 
			<option value="yes">yes</option>
			<option value="no">no</option>
		</select>
		</p>
		<do label="submit" type="accept">
			<go href="nextAction?midp=$(midp)" sendreferer="true" method="get"/>
		</do>
</card>
</wml>

Sample cHTML Output:

<html>
<head>
	<title></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"></a>
	</div>
	<form enctype="application/x-www-form-urlencoded" action="nextAction" method="get">
		<input name="midp" type="checkbox"></input>MIDP<br> 
		<input name="request" type="sub	mit" value="Submit"></input>
	</form>
</body>
</html>