Template
Define normal Snaml for Java/WML header.
public void wmlHeader()
{
__pi( "xml version='1.0'" );
__doctype( "wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN "
+ "http://www.wapforum.org/DTD/wml_1.1.xml" );
}
setting possible type value (help, accept, options, prev, reset, delete, unknow).
_do methods inside the _template define their actions with the for iteration.
wmlHeader();
int i;
String[] ls = {"help", "accept", "options",
"prev", "reset", "delete", "unknown"};
_wml();
_template();
for (i=0; i < ls.length; i++) {
_do( "type='" + ls[i] + "'" );
__go( "href='#card_" + ls[i] + "'" );
do_();
}
template_();
following iteration defines cards. Each card is aligned on center and
displayed the string of ls[i].
for (i=0; i < ls.length; i++) {
_card( "id='card_" + ls[i] + "'" );
_p( "align='center'" );
quote( "Card: " + ls[i] );
p_();
card_();
}
wml_();
|