Java 2EE and XML Development

Скачать в pdf «Java 2EE and XML Development»


Listing 5.5 The British English, HTML watch list JSP


<jsp:useBean name=»helper» scope=»page»


class=»examples.chapter5.XMLHelperBean»/>


<%@ taglib uri=»example.tld» prefix=»helperTag» %>


<html>


<head><title>Your Watch List</title></head>


<body>


<h1>Your Stock Price Watch List</h1>


<h3>


Greetings, Mr.


<jsp:getProperty name=»helper» property=»lastName»/>! </h3>


<h3>


Here are the latest prices on your stocks of interest.


</h3>


<p><i>


Price quotes as of


<jsp:getProperty name=»helper» property=»quoteTime»/> on


<jsp:getProperty name=»helper» property=»quoteDate»/>. </i></p>


<table cellpadding=»5″ cellspacing=»0″ border=»1″>


<helperTag:printData useLinks=»yes» currency=»GBP»/>


</table>


</body>


</html>


Now all that remains is to develop the WML versions of the watch list page. These pages contain a bit less textual information and do not have links to directly buy individual stocks. If you need to refresh your memory on what each of these pages looks like, flip back to figures 5.1 through 5.4.


Listing 5.6 The U.S. English WML watch list JSP


<jsp:useBean name=»helper» scope=»page»


class=»examples.chapter5.XMLHelperBean»/>


<%@ taglib uri=»example.tld» prefix=»helperTag» %>


<wml>


<card id=»main» title=»Your Watch List»>


<do type=»accept» name=»do-back» label=»Back»>


<go href=»http://www.exampleco.com/home.wml» />


</do>


<do type=»accept» name=»do-buy» label=»Buy Shares»>


<go href=»http://www.exampleco.com/buyShares» />


</do>


<do type=»accept» name=»do-sell» label=»Sell Shares»>


<go href=»http://www.exampleco.com/sellShares» />


</do>


<p>


<b>


Hello,


<jsp:getProperty name=»helper» property=»firstName»/>! </b>


</p>


<p>Here are your latest watch list price quotes:</p>


<table columns=»3″>


<helperTag:printData useLinks=»no» currency=»USD»/> <—


</table>    prjnts the WML-version


</card>    without links

Скачать в pdf «Java 2EE and XML Development»