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

AmlURL

Description

An AmlURL element creates a URL in the document.

Element Body

(AmlParam)*

Parent

AmlPage, AmlChoice, AmlOption, AmlForm, AmlTableCol, AmlTableHead, AmlInput, AmlLink, AmlControlMenu, AmlCheckBox, AmlGroup, AmlListItem, AmlOrderedList, AmlList, AmlSelectList

Restrictions

None

AML Attributes

Attribute  

Description  

Possible values  

Default  

Req’d?  

action 

Set the base location of the URL 

CDATA 

No Default 

No 

type 

Set the attribute in which the URL is contained 

wml_refresh 

No Default 

No 

cache 

Set caching 

(true|false) 

true 

No 

persist 

Set the persist flag 

(true|false) 

true 

No 

encode 

Set the encode flag 

(true|false) 

true 

No 

Markup Language Examples

Sample AML Input:

<AmlDocument title="AmlURL ">
	<AmlPage menu_pos="bottom">
		<AmlLink> <AmlURL action="http://www.google.com/search">
		<AmlParam name="soda" value="true"/>
		<AmlParam name="flavour" value="orange"/>
		<AmlParam name="colour"  value="orange"/>
		</AmlURL>
		<AmlText text="Hello World Link!"/>
		</AmlLink>
		<AmlBr/>
	</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="nt">
		<p align="center"></p>
		<p>Hello world</p>
		<do label="Next Page" type="options">
			<go href="#agp1" sendreferer="true"/>
		</do>
	</card>
	<card id="agp1">
		<do label="Previous Page" type="options">
			<go href="#nt" sendreferer="true"/>
		</do>
		<onevent type="ontimer">
			<go href="http://www.yahoo.com"/>
		</onevent>
		<timer value="1"/>
		<p align="center"></p>
		<p>
		<a href="http://www.google.com/search?soda=true&amp;flavour=orange&	
			amp;colour=orange"> HelloWorld Link! </a>
		</p>
		<p><br/></p>
	</card>
</wml>

Sample cHTML Output:

<html>
	<head>
		<title>AmlURL </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="nt"></a>
		</div>Hello world
		<div align="center">
			<a name="agp1"></a>
		</div>
			<a href="http://www.google.com/search?soda=true&flavour=orange&colo
				ur=orange">Hello World Link!</a><br>
	</body>
</html>