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

AmlTable

Description

The AmlTable is a standard table element. AmlTable is the table as a whole and is not a content presenter. The AmlTable must contain one or more AmlTableRows. An AmlTableRow must contain one or more AmlTableCols. An AmlTable can be added to an AmlPage or an AmlForm.

Element Body

(AmlContainer*, AmlTableRow+, AmlStyle?)

Parent

AmlPage, AmlForm, AmlGroup

Restrictions

None

AML Attributes

Attribute  

Description  

Possible values  

Default  

Req’d?  

columns 

Set number of columns for table 

CDATA 

No Default 

No 

maxcolwidth 

Set maximum column width for columns in table 

CDATA 

No Default 

No 

border 

Set border width for table 

CDATA 

No Default 

No 

halign 

Set horizontal alignment 

(left|right|center) 

No Default 

No 

cache 

Set cache flag 

(true|false) 

true 

No 

persist 

Set persist flag 

(true|false) 

false 

No 

Markup Language Examples

Sample AML Input:

<AmlDocument title="Welcome">
	<AmlPage title="Table" bold="true">
		<AmlTable columns="3"><AmlTableRow header="true">
		<AmlTableCol><AmlText text="Name"/>
		</AmlTableCol><AmlTableCol>
		AmlText text="Location"/></AmlTableCol>
		<AmlTableCol><AmlText text="State"/>
		</AmlTableCol></AmlTableRow>
		<AmlTableRow><AmlTableCol>
		<AmlText text="Dev"/></AmlTableCol>
		<AmlTableCol><AmlText text="Phoenix"/>
		</AmlTableCol><AmlTableCol>
		<AmlText text="AZ"/></AmlTableCol>
		</AmlTableRow><AmlTableRow>
		<AmlTableCol><AmlText text="Mktg"/>
		</AmlTableCol><AmlTableCol>
		<AmlText text="SFO"/></AmlTableCol>
		<AmlTableCol><AmlText text="CA"/>
		</AmlTableCol></AmlTableRow>
		</AmlTable>
	</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">Table</p>
		<p>
		<select>
		<option onpick="#agp0r1">Dev</option>
		<option onpick="#agp0r2">Mktg</option>
		</select>
		</p>
		</card>
		<card id="agp0r1">
		<p>Name : Dev<br/>Location : Phoenix<br/>State :AZ<br/>
		<a href="#agp0">Back</a>
		</p>
		</card>
		<card id="agp0r2">
		<p>Name : Mktg<br/>Location : SFO<br/>State : CA<br/>
		<a href="#agp0">Back</a>
		</p>
		</card>
</wml>

Sample cHTML Output:

<html>
	<head>
		<title>Welcome</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">
				<b>Table</b>
			</a>
		</div>
		<table> <tr> <td>Name</td>
		<td>Location</td> <td>State</td>
		</tr> <tr> <td>Dev</td>
		<td>Phoenix</td> <td>AZ</td>
		</tr> <tr> <td>Mktg</td>
		<td>SFO</td> <td>CA</td>
		</tr> </table>
	</body>
</html>