forked from Apress/pro-wicket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3093.html
5657 lines (5648 loc) · 258 KB
/
3093.html
1
<html xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:w="urn:schemas-microsoft-com:office:word"xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Titlecontent="Errata for 419-3 Trolsen (corrected in the second printing)"><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=macintosh"><meta name=ProgId content=Word.Document><meta name=Generator content="Microsoft Word 11"><meta name=Originator content="Microsoft Word 11"><link rel=File-List href="722-2%20Errata_files/filelist.xml"><title>Errata for 419-3 Trolsen (corrected in the second printing)</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Richard Ables</o:Author> <o:Template>Normal</o:Template> <o:LastAuthor>Richard Ables</o:LastAuthor> <o:Revision>2</o:Revision> <o:Created>2006-09-22T18:55:00Z</o:Created> <o:LastSaved>2006-09-22T18:55:00Z</o:LastSaved> <o:Pages>26</o:Pages> <o:Words>5530</o:Words> <o:Characters>31523</o:Characters> <o:Lines>262</o:Lines> <o:Paragraphs>63</o:Paragraphs> <o:CharactersWithSpaces>38712</o:CharactersWithSpaces> <o:Version>11.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>125</w:Zoom> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:UseMarginsForDrawingGridOrigin/> </w:WordDocument></xml><![endif]--><style><!-- /* Font Definitions */@font-face {font-family:"Times New Roman"; panose-1:0 2 2 6 3 5 4 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Arial; panose-1:0 2 11 6 4 2 2 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Courier New"; panose-1:0 2 7 3 9 2 2 5 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Geneva; panose-1:0 2 11 5 3 3 4 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Tms Rmn"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Helv; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:swiss; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"MS Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"MS Sans Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:swiss; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"New York"; panose-1:0 2 2 5 2 6 3 5 6 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:System; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:swiss; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Wingdings; panose-1:0 5 2 1 2 1 8 4 8 7; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"\FF2D\FF33 \660E\671D"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:\BC14\D0D5; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:\5B8B\4F53; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\65B0\7D30\660E\9AD4; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:"\FF2D\FF33 \30B4\30B7\30C3\30AF"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:Century; panose-1:0 2 4 6 4 5 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Verdana; panose-1:0 2 11 6 4 3 5 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Tahoma; panose-1:0 2 11 6 4 3 5 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Monotype Sorts"; panose-1:0 1 1 6 1 1 1 1 1 1; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:Verdana-Bold; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:Verdana; mso-font-charset:77; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Grande"; panose-1:0 2 11 6 0 4 5 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Abadi MT Condensed Extra Bold"; panose-1:0 2 11 10 6 3 1 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Abadi MT Condensed Light"; panose-1:0 2 11 3 6 3 1 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"American Typewriter"; panose-1:0 2 9 6 4 2 0 4 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"American Typewriter Condensed"; panose-1:0 2 9 6 6 2 0 4 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"American Typewriter Light"; panose-1:0 2 9 3 4 2 0 4 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Andale Mono"; panose-1:0 2 11 5 9 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Andale Sans"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Andale Sans Bold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Andale Sans BoldItalic "; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Andale Sans Italic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Apple Chancery"; panose-1:0 3 2 7 2 4 5 6 6 5; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Arial Black"; panose-1:0 2 11 10 4 2 1 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Arial Narrow"; panose-1:0 2 11 5 6 2 2 2 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Arial Rounded MT Bold"; panose-1:0 2 15 7 4 3 5 4 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"B Optima Bold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Baskerville; panose-1:0 2 2 5 2 7 4 1 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Baskerville Old Face"; panose-1:0 2 2 6 2 8 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Baskerville Semibold"; panose-1:0 2 2 7 2 7 4 0 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Bauhaus 93"; panose-1:0 4 3 9 5 2 11 2 2 12; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Bell MT"; panose-1:0 2 2 5 3 6 3 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Bernard MT Condensed"; panose-1:0 2 5 8 6 6 9 5 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"BI Optima BoldOblique"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Big Caslon"; panose-1:0 2 0 6 3 9 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Book Antiqua"; panose-1:0 2 4 6 2 5 3 5 3 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Bookman Old Style"; panose-1:0 2 5 6 4 5 5 5 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Braggadocio; panose-1:0 4 3 11 7 13 11 2 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Britannic Bold"; panose-1:0 2 11 9 3 6 7 3 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Brush Script MT"; panose-1:0 3 6 8 2 4 4 6 7 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Calisto MT"; panose-1:0 2 4 6 3 5 5 5 3 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Capitals; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Century Gothic"; panose-1:0 2 11 5 2 2 2 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Century Schoolbook"; panose-1:0 2 4 6 4 5 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Chalkboard; panose-1:0 3 5 6 2 4 2 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Chalkboard Bold"; panose-1:0 3 5 6 2 4 2 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Charcoal; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Chicago; panose-1:0 2 11 8 6 8 6 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Cochin; panose-1:0 2 0 6 3 2 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Colonna MT"; panose-1:0 4 2 8 5 6 2 2 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Comic Sans MS"; panose-1:0 3 15 7 2 3 3 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Cooper Black"; panose-1:0 2 8 9 4 4 3 11 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Copperplate; panose-1:0 2 0 5 4 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Copperplate Gothic Bold"; panose-1:0 2 14 7 5 2 2 6 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Copperplate Gothic Light"; panose-1:0 2 14 5 7 2 2 6 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Copperplate Light"; panose-1:0 2 0 6 4 3 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Curlz MT"; panose-1:0 4 4 4 4 5 7 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Desdemona; panose-1:0 4 2 5 5 2 14 3 4 5; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Didot; panose-1:0 2 0 5 3 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Edwardian Script ITC"; panose-1:0 3 3 3 2 4 7 7 13 8; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Engravers MT"; panose-1:0 2 9 7 7 8 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Euphemia UCAS"; panose-1:0 2 11 5 3 4 1 2 2 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Euphemia UCAS Bold"; panose-1:0 2 11 8 3 4 1 2 2 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Euphemia UCAS Italic"; panose-1:0 2 11 5 3 4 1 2 2 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Eurostile; panose-1:0 2 11 5 4 2 2 2 5 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Footlight MT Light"; panose-1:0 2 4 6 2 6 3 10 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Franklin Gothic Condensed"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Franklin Gothic ExtraCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Franklin Gothic No\.2"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Futura; panose-1:0 2 11 6 2 2 2 4 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Futura Condensed"; panose-1:0 2 11 5 6 2 2 4 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Gadget; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Garamond; panose-1:0 2 2 4 4 3 3 1 1 8; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Geeza Pro"; panose-1:0 2 0 4 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Geeza Pro Bold"; panose-1:0 2 0 7 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Georgia; panose-1:0 2 4 5 2 5 4 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Gill Sans"; panose-1:0 2 11 5 2 2 1 4 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Gill Sans Light"; panose-1:0 2 11 3 2 2 1 4 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Gill Sans Ultra Bold"; panose-1:0 2 11 10 2 2 1 4 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Gloucester MT Extra Condensed"; panose-1:0 2 3 8 8 2 6 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Goudy Old Style"; panose-1:0 2 2 5 2 5 3 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Haettenschweiler; panose-1:0 2 11 7 6 4 9 2 6 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Harrington; panose-1:0 4 4 5 5 5 10 2 2 7; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 25 UltraLight"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 26 UltraLightItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 35 Thin"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 36 ThinItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 45 Light"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 46 LightItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 55 Roman"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 56 Italic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 65 Medium"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 66 MediumItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 75 Bold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 76 BoldItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 85 Heavy"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 86 HeavyItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 95 Black"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica 96 BlackItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica Neue"; panose-1:0 2 0 5 3 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica Neue Black Condensed"; panose-1:0 2 0 10 6 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica Neue Bold Condensed"; panose-1:0 2 0 8 6 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica Neue Light"; panose-1:0 2 0 4 3 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Helvetica Neue UltraLight"; panose-1:0 2 0 2 6 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue BlackCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue BlackCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue BoldCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue BoldCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue Condensed"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue CondensedObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue ExtBlackCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue ExtBlackCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue HeavyCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue HeavyCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue LightCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue LightCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue MediumCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue MediumCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue ThinCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue ThinCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue UltraLigCond"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"HelveticaNeue UltraLigCondObl"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Herculanum; panose-1:0 2 0 5 5 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Hoefler Text"; panose-1:0 2 3 6 2 5 5 6 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Hoefler Text Ornaments"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"I Optima Oblique"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Impact; panose-1:0 2 11 8 6 3 9 2 5 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Imprint MT Shadow"; panose-1:0 4 2 6 5 6 3 3 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:InaiMathi; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Kino MT"; panose-1:0 4 3 7 5 13 12 2 2 7; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Blackletter"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Bright"; panose-1:0 2 4 6 2 5 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Calligraphy"; panose-1:0 3 1 1 1 1 1 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Fax"; panose-1:0 2 6 6 2 5 5 5 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Handwriting"; panose-1:0 3 1 1 1 1 1 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Sans"; panose-1:0 2 11 6 2 3 5 4 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Lucida Sans Typewriter"; panose-1:0 2 11 5 9 3 5 4 3 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Marker Felt"; panose-1:0 2 0 4 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Matura MT Script Capitals"; panose-1:0 3 2 8 2 6 6 2 7 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Mistral; panose-1:0 3 9 7 2 3 4 7 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Modern No\. 20"; panose-1:0 2 7 7 4 7 5 5 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Monaco; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Monotype Corsiva"; panose-1:0 3 1 1 1 1 2 1 1 1; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"MT Extra"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"News Gothic MT"; panose-1:0 2 11 5 4 2 2 3 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Onyx; panose-1:0 4 5 6 2 8 7 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Optima; panose-1:0 2 0 5 3 6 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Optima ExtraBlack"; panose-1:0 2 0 11 3 0 0 0 2 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Palatino; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Papyrus; panose-1:0 2 11 6 2 4 2 0 2 3; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Perpetua Titling MT"; panose-1:0 2 2 5 2 6 5 5 2 8; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Plantagenet Cherokee"; panose-1:0 2 2 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Playbill; panose-1:0 4 5 6 3 10 6 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Rockwell; panose-1:0 2 6 6 3 2 2 5 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Rockwell Extra Bold"; panose-1:0 2 6 9 3 4 5 5 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Sand; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Skia; panose-1:0 2 13 5 2 2 2 4 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Stencil; panose-1:0 4 4 9 5 13 8 2 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Techno; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Textile; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-2 ExtraLight"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-3 Light"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-3i LightItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-4 SemiLight"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:TheSansMonoCon-5; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-5i Italic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-6 SemiBold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-7 Bold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-7i BoldItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-8 ExtraBold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-9 Black"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"TheSansMonoCon-9i BlackItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Times Bold"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Times Bold Italic"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Times Italic"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Trebuchet MS"; panose-1:0 2 11 6 3 2 2 2 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Utopia; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia Black"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia Bold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia BoldItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia Italic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia Semibold"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Utopia SemiboldItalic"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro"; panose-1:0 2 10 6 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold"; panose-1:0 2 10 7 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Caption"; panose-1:0 2 10 8 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Display"; panose-1:0 2 10 7 3 8 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Ital"; panose-1:0 2 10 7 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Ital Caption"; panose-1:0 2 10 8 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Ital Display"; panose-1:0 2 10 7 3 8 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Ital Subhead"; panose-1:0 2 10 7 3 7 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Bold Subhead"; panose-1:0 2 10 7 3 7 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Caption"; panose-1:0 2 10 6 3 5 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Display"; panose-1:0 2 10 5 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Ital"; panose-1:0 2 10 6 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Ital Caption"; panose-1:0 2 10 6 3 5 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Ital Display"; panose-1:0 2 10 5 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Ital Subhead"; panose-1:0 2 10 5 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light"; panose-1:0 2 10 5 3 5 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Caption"; panose-1:0 2 10 5 3 5 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Display"; panose-1:0 2 10 4 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Ital"; panose-1:0 2 10 5 3 5 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Ital Caption"; panose-1:0 2 10 5 3 5 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Ital Display"; panose-1:0 2 10 4 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Ital Subhead"; panose-1:0 2 10 5 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Light Subhead"; panose-1:0 2 10 5 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd"; panose-1:0 2 10 7 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Caption"; panose-1:0 2 10 7 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Display"; panose-1:0 2 10 6 3 8 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Ital"; panose-1:0 2 10 7 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Ital Caption"; panose-1:0 2 10 7 3 6 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Ital Display"; panose-1:0 2 10 6 3 8 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Ital Subhead"; panose-1:0 2 10 6 3 7 5 11 9 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro SmBd Subhead"; panose-1:0 2 10 6 3 7 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Warnock Pro Subhead"; panose-1:0 2 10 5 3 6 5 11 2 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Webdings; panose-1:0 5 3 1 2 1 5 9 6 7; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"Wide Latin"; panose-1:0 2 10 10 7 5 5 5 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Wingdings 2"; panose-1:0 5 2 1 2 1 5 7 7 7; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"Wingdings 3"; panose-1:0 5 4 1 2 1 8 7 7 7; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:"Zapf Dingbats"; panose-1:0 5 2 1 2 1 7 4 2 6; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 256 0 -2147483648 0;}@font-face {font-family:Zapfino; panose-1:0 3 3 3 0 4 7 7 7 12; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Courier CE"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:"Geneva CE"; panose-1:0 2 11 5 3 3 4 4 4 2; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:"Helvetica CE"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:Krungthep; panose-1:0 2 0 4 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:"Lucida Grande CE"; panose-1:0 2 11 6 0 4 5 2 2 2; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:"Monaco CE"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:Silom; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:"Times CE"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:88; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:83886080 0 0 0 2 0;}@font-face {font-family:Ayuthaya; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Baskerville Cyr Bold"; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Baskerville Cyr Inclined"; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Baskerville Cyr Upright"; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Charcoal CY"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Geneva CY"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Helvetica CY"; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Lucida Grande CY"; panose-1:0 2 11 6 0 4 5 2 2 2; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Monaco CY"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:Sathu; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:Thonburi; panose-1:0 0 0 4 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Times CY"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:89; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16908288 0 0 0 4 0;}@font-face {font-family:"Apple LiGothic Medium"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:"Apple LiSung Light"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:BiauKai; panose-1:0 2 1 6 1 0 1 1 1 1; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:"\5137\5B8B Pro"; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:"\5137\9ED1 Pro"; mso-font-charset:81; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 134479873 0 1048576 0;}@font-face {font-family:"Fang Song"; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:"GB18030 Bitmap"; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:Hei; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:Kai; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:Song; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\534E\6587\4EFF\5B8B; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\534E\6587\9ED1\4F53; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\534E\6587\6977\4F53; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\534E\6587\5B8B\4F53; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:\534E\6587\7EC6\9ED1; mso-font-charset:80; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 235143169 0 262144 0;}@font-face {font-family:"\FF2D\FF33 \FF30\30B4\30B7\30C3\30AF"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\FF2D\FF33 \FF30\660E\671D"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:Osaka; panose-1:0 2 11 6 0 0 0 0 0 0; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:Osaka\2212\7B49\5E45; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\89D2\30B4 Pro W3"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\89D2\30B4 Pro W6"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\89D2\30B4 Std W8"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\4E38\30B4 Pro W4"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\660E\671D Pro W3"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\30D2\30E9\30AE\30CE\660E\671D Pro W6"; mso-font-charset:78; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 117702657 0 131072 0;}@font-face {font-family:"\#PC\BA85\C870"; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:"\#\AD81\C11C\CCB4"; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:"\#\D544\AE30\CCB4"; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:"\#\D5E4\B4DC\B77C\C778A"; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:AppleGothic; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:AppleMyungjo; panose-1:0 2 0 5 0 0 0 0 0 0; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:\AD74\B9BC; mso-font-charset:79; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:16777216 0 103022593 0 524288 0;}@font-face {font-family:VT100; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:SemiLight; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:77; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Utopia-Regular; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:Utopia; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:HelveticaNeue-BoldCond; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"HelveticaNeue BoldCond"; mso-font-charset:77; mso-generic-font-family:swiss; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:TheSansMonoCondensed-Bold; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"TheSansMonoCon-7 Bold"; mso-font-charset:77; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:TheSansMonoCondensed-SemiLight; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"TheSansMonoCon-4 SemiLight"; mso-font-charset:77; mso-generic-font-family:auto; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Utopia-Italic; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Utopia Italic"; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Bug Workaround"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:50331648 0 0 0 1 0;} /* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman";}table.MsoNormalTable {mso-style-parent:""; font-size:10.0pt; font-family:"Times New Roman";}@page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}--></style></head><body bgcolor=white lang=EN-US style='tab-interval:.5in'><div class=Section1><p class=MsoNormal>Errata for 722-2 Gurumurthy<o:p></o:p></p><table border=1 cellspacing=0 cellpadding=0 width=505 style='width:504.9pt; border-collapse:collapse;border:none;mso-border-top-alt:solid gray 1.0pt; mso-border-left-alt:solid gray 1.0pt;mso-border-right-alt:solid gray 1.0pt; mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>Page<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border:solid gray 1.0pt;border-left:none; mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>4<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><Set name="Port"><SystemProperty name="jetty.port" default="8081"/></Set><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><display-name>Wicket Web Application</display-name><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>10<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now that you are done registering the web application main class, start Tomcat and see<o:p></o:p></p> <p class=MsoNormal>whether the application starts up:<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now that you are done registering the web application main class, start Jetty and see<o:p></o:p></p> <p class=MsoNormal>whether the application starts up:<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>11<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><display-name>Wicket Shop</display-name><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><display-name>Wicket Web Application</display-name><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>19<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 1-12. UserProfilePage.java<o:p></o:p></p> <p class=MsoNormal>import java.util.Arrays;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.WebPage;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.DropDownChoice;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.Form;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.TextField;<o:p></o:p></p> <p class=MsoNormal>import wicket.model.CompoundPropertyModel;<o:p></o:p></p> <p class=MsoNormal>import com.wicketdev.app.model.UserProfile;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 1-12. UserProfilePage.java<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.forms;<o:p></o:p></p> <p class=MsoNormal>import java.util.Arrays;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.WebPage;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.DropDownChoice;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.Form;<o:p></o:p></p> <p class=MsoNormal>import wicket.markup.html.form.TextField;<o:p></o:p></p> <p class=MsoNormal>import wicket.model.CompoundPropertyModel;<o:p></o:p></p> <p class=MsoNormal>import com.apress.wicketbook.common.UserProfile;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>27<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>setUserid(params.getString("userId"));<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>setUserId(params.getString("userId"));<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>http://localhost:7000/wicket/helloworld?wicket:<o:p></o:p></p> <p class=MsoNormal>bookmarkablePage=:com.apress.wicketbook.forms.Welcome&userId=wicket<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>http://localhost:8080/wicket/helloworld?wicket:<o:p></o:p></p> <p class=MsoNormal>bookmarkablePage=:com.apress.wicketbook.forms.Welcome&userId=wicket<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>29<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>// Don't forget to add them to the Form<o:p></o:p></p> <p class=MsoNormal>form.add(linkToUserProfile);<o:p></o:p></p> <p class=MsoNormal>form.add(linkToLogin);<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>// Don't forget to add them to the Page<o:p></o:p></p> <p class=MsoNormal>add(linkToUserProfile);<o:p></o:p></p> <p class=MsoNormal>add(linkToLogin);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>31<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public class Welcome extends WebPage {<o:p></o:p></p> <p class=MsoNormal>String userId;<o:p></o:p></p> <p class=MsoNormal>Page prevPage;<o:p></o:p></p> <p class=MsoNormal>public Welcome(String userId, Page prevPage){<o:p></o:p></p> <p class=MsoNormal>this.userId;<o:p></o:p></p> <p class=MsoNormal>this.prevPage = prevPage;<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>Link linkToLogin = new Link("linkToLogin"){<o:p></o:p></p> <p class=MsoNormal>public void onClick(){<o:p></o:p></p> <p class=MsoNormal>setResponsePage(prevPage==null?new Login():prevPage);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public class Welcome extends WebPage {<o:p></o:p></p> <p class=MsoNormal>private String userId;<o:p></o:p></p> <p class=MsoNormal>private Page prevPage;<o:p></o:p></p> <p class=MsoNormal>public Welcome(){<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>Link linkToLogin = new Link("linkToLogin"){<o:p></o:p></p> <p class=MsoNormal>public void onClick(){<o:p></o:p></p> <p class=MsoNormal>setResponsePage(prevPage==null?new Login():prevPage);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>/** Add a new constructor that accepts a Page reference **/<o:p></o:p></p> <p class=MsoNormal>public Welcome(String userId, Page prevPage){<o:p></o:p></p> <p class=MsoNormal>this();<o:p></o:p></p> <p class=MsoNormal>this.userId = userId;<o:p></o:p></p> <p class=MsoNormal>this.prevPage = prevPage;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>35<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-1. Login.html<o:p></o:p></p> <p class=MsoNormal><html><o:p></o:p></p> <p class=MsoNormal><title>Sample Wicket Application</title><o:p></o:p></p> <p class=MsoNormal><body><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-1. Login.html<o:p></o:p></p> <p class=MsoNormal><html><o:p></o:p></p> <p class=MsoNormal><title>Hello World</title><o:p></o:p></p> <p class=MsoNormal><body><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>39<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>If you find this default behavior a little too extreme for your taste, you can turn it off<o:p></o:p></p> <p class=MsoNormal>through a getExceptionSettings().setThrowExceptionOnMissingResource(false) call in your<o:p></o:p></p> <p class=MsoNormal>WebApplication class.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>If you find this default behavior a little too extreme for your taste, you can turn it off<o:p></o:p></p> <p class=MsoNormal>through a getExceptionSettings().setThrowExceptionOnMissingResource(false) call in your<o:p></o:p></p> <p class=MsoNormal>WebApplication.init() method.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>40<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>After incorporating the preceding modifications, click Save without entering any input<o:p></o:p></p> <p class=MsoNormal>values. You should see something like the message in Figure 2-4.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Add a <span> tag to the UserProfilePage.html to accommodate the FeedbackPanel component<o:p></o:p></p> <p class=MsoNormal>similar to Listing 2-1.<o:p></o:p></p> <p class=MsoNormal>After incorporating the preceding modifications, click Save without entering any input<o:p></o:p></p> <p class=MsoNormal>values. You should see something like the message in Figure 2-4.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>46<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-9. PhoneNumber.java<o:p></o:p></p> <p class=MsoNormal>public class PhoneNumber implements Serializable{<o:p></o:p></p> <p class=MsoNormal>private String areaCode;<o:p></o:p></p> <p class=MsoNormal>private String prefix;<o:p></o:p></p> <p class=MsoNormal>private String number;<o:p></o:p></p> <p class=MsoNormal>public PhoneNumber(String code, String number, String prefix) {<o:p></o:p></p> <p class=MsoNormal>this.areaCode = code;<o:p></o:p></p> <p class=MsoNormal>this.number = number;<o:p></o:p></p> <p class=MsoNormal>this.prefix = prefix;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-9. PhoneNumber.java<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.common<o:p></o:p></p> <p class=MsoNormal>public class PhoneNumber implements Serializable{<o:p></o:p></p> <p class=MsoNormal>private String areaCode;<o:p></o:p></p> <p class=MsoNormal>private String prefix;<o:p></o:p></p> <p class=MsoNormal>private String number;<o:p></o:p></p> <p class=MsoNormal>public PhoneNumber(String code, String prefix, String number) {<o:p></o:p></p> <p class=MsoNormal>this.areaCode = code;<o:p></o:p></p> <p class=MsoNormal>this.number = number;<o:p></o:p></p> <p class=MsoNormal>this.prefix = prefix;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-11. UserProfilePage.PhoneNumberConverter<o:p></o:p></p> <p class=MsoNormal>public class UserProfilePage extends AppBasePage{<o:p></o:p></p> <p class=MsoNormal>//...<o:p></o:p></p> <p class=MsoNormal>//...<o:p></o:p></p> <p class=MsoNormal>public static class PhoneNumberConverter implements IConverter{<o:p></o:p></p> <p class=MsoNormal>private Locale locale;<o:p></o:p></p> <p class=MsoNormal>// This is the method that the framework calls<o:p></o:p></p> <p class=MsoNormal>public Object convert(Object value, Class c) {<o:p></o:p></p> <p class=MsoNormal>if (value == null){<o:p></o:p></p> <p class=MsoNormal>return null;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// If the target type for conversion is String,<o:p></o:p></p> <p class=MsoNormal>// convert the PhoneNumber to the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>if (c == String.class){<o:p></o:p></p> <p class=MsoNormal>PhoneNumber phoneNumber = (PhoneNumber) value;<o:p></o:p></p> <p class=MsoNormal>return<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getPrefix() + "-" +<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getAreaCode() + "-" +<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getNumber();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Assume for now that the input is of the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>String numericString = stripExtraChars((String)value);<o:p></o:p></p> <p class=MsoNormal>String areaCode = numericString.substring(0,3);<o:p></o:p></p> <p class=MsoNormal>String prefix = numericString.substring(3,6);<o:p></o:p></p> <p class=MsoNormal>String number = numericString.substring(6);<o:p></o:p></p> <p class=MsoNormal>UserProfile.PhoneNumber phoneNumber =<o:p></o:p></p> <p class=MsoNormal>new UserProfile.PhoneNumber(areaCode, prefix, number);<o:p></o:p></p> <p class=MsoNormal>return phoneNumber;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Removes all nonnumeric characters from the input.<o:p></o:p></p> <p class=MsoNormal>// If supplied with 123-456-7890, it returns 1234567890.<o:p></o:p></p> <p class=MsoNormal>private String stripExtraChars(String input ) {<o:p></o:p></p> <p class=MsoNormal>return input.replaceAll("[^0-9]", "");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Currently you are not doing locale-specific parsing<o:p></o:p></p> <p class=MsoNormal>public void setLocale(Locale locale) {<o:p></o:p></p> <p class=MsoNormal>this.locale = locale;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Locale getLocale() {<o:p></o:p></p> <p class=MsoNormal>return this.locale;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-11 shows one of the ways of implementing the custom converter:<o:p></o:p></p> <p class=MsoNormal>PhoneNumberConverter.<o:p></o:p></p> <p class=MsoNormal>Listing 2-11. UserProfilePage.PhoneNumberConverter<o:p></o:p></p> <p class=MsoNormal>public class UserProfilePage extends AppBasePage{<o:p></o:p></p> <p class=MsoNormal>//...<o:p></o:p></p> <p class=MsoNormal>//...<o:p></o:p></p> <p class=MsoNormal>public static class PhoneNumberConverter implements IConverter{<o:p></o:p></p> <p class=MsoNormal>private Locale locale;<o:p></o:p></p> <p class=MsoNormal>// This is the method that the framework calls<o:p></o:p></p> <p class=MsoNormal>public Object convert(Object value, Class c) {<o:p></o:p></p> <p class=MsoNormal>if (value == null){<o:p></o:p></p> <p class=MsoNormal>return null;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>//If the value is already of the same type as 'c'<o:p></o:p></p> <p class=MsoNormal>//then return it without any modifications.<o:p></o:p></p> <p class=MsoNormal>if (value.getClass() == c) {<o:p></o:p></p> <p class=MsoNormal>return value;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// If the target type for conversion is String,<o:p></o:p></p> <p class=MsoNormal>// convert the PhoneNumber to the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>if (c == String.class){<o:p></o:p></p> <p class=MsoNormal>PhoneNumber phoneNumber = (PhoneNumber) value;<o:p></o:p></p> <p class=MsoNormal>return<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getAreaCode() + "-" +<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getPrefix() + "-" +<o:p></o:p></p> <p class=MsoNormal>phoneNumber.getNumber();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Assume for now that the input is of the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>String numericString = stripExtraChars((String)value);<o:p></o:p></p> <p class=MsoNormal>String areaCode = numericString.substring(0,3);<o:p></o:p></p> <p class=MsoNormal>String prefix = numericString.substring(3,6);<o:p></o:p></p> <p class=MsoNormal>String number = numericString.substring(6);<o:p></o:p></p> <p class=MsoNormal>PhoneNumber phoneNumber =<o:p></o:p></p> <p class=MsoNormal>new PhoneNumber(areaCode, prefix, number);<o:p></o:p></p> <p class=MsoNormal>return phoneNumber;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Removes all nonnumeric characters from the input.<o:p></o:p></p> <p class=MsoNormal>// If supplied with 123-456-7890, it returns 1234567890.<o:p></o:p></p> <p class=MsoNormal>private String stripExtraChars(String input ) {<o:p></o:p></p> <p class=MsoNormal>return input.replaceAll("[^0-9]", "");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Currently you are not doing locale-specific parsing<o:p></o:p></p> <p class=MsoNormal>public void setLocale(Locale locale) {<o:p></o:p></p> <p class=MsoNormal>this.locale = locale;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Locale getLocale() {<o:p></o:p></p> <p class=MsoNormal>return this.locale;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-13. Specifying a ÒRegexÓ Pattern to Match Phone Numbers<o:p></o:p></p> <p class=MsoNormal>import wicket.util.convert.ConversionException;<o:p></o:p></p> <p class=MsoNormal>public static class PhoneNumberConverter implements IConverter{<o:p></o:p></p> <p class=MsoNormal>static Pattern pattern = Pattern.compile("\\d{3}-\\d{3}-\\d{4}");<o:p></o:p></p> <p class=MsoNormal>// This is the method that the framework calls<o:p></o:p></p> <p class=MsoNormal>public Object convert(Object value, Class c) {<o:p></o:p></p> <p class=MsoNormal>//<o:p></o:p></p> <p class=MsoNormal>// Assume for now that the input is of the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>// Check if the user input matches the required phone nummber<o:p></o:p></p> <p class=MsoNormal>// pattern.<o:p></o:p></p> <p class=MsoNormal>// A pattern that matches a string comprising of 3 digits followed<o:p></o:p></p> <p class=MsoNormal>// by a '-' separator, followed by 3 digits again, followed by a<o:p></o:p></p> <p class=MsoNormal>//'-' separator and 4 digits after that.<o:p></o:p></p> <p class=MsoNormal>if (!pattern.matcher((String) value).matches()) {<o:p></o:p></p> <p class=MsoNormal>// If the pattern does not match, throw ConversionException<o:p></o:p></p> <p class=MsoNormal>throw new ConversionException("Supplied value " + value<o:p></o:p></p> <p class=MsoNormal>+ " does not match the pattern " + pattern.toString(),<o:p></o:p></p> <p class=MsoNormal>value, locale);<o:p></o:p></p> <p class=MsoNormal>} //..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-13. Specifying a ÒRegexÓ Pattern to Match Phone Numbers<o:p></o:p></p> <p class=MsoNormal>import wicket.util.convert.ConversionException;<o:p></o:p></p> <p class=MsoNormal>public static class PhoneNumberConverter implements IConverter{<o:p></o:p></p> <p class=MsoNormal>final Pattern pattern = Pattern.compile("\\d{3}-\\d{3}-\\d{4}");<o:p></o:p></p> <p class=MsoNormal>// This is the method that the framework calls<o:p></o:p></p> <p class=MsoNormal>public Object convert(Object value, Class c) {<o:p></o:p></p> <p class=MsoNormal>//<o:p></o:p></p> <p class=MsoNormal>// Assume for now that the input is of the form xxx-xxx-xxxx<o:p></o:p></p> <p class=MsoNormal>// Check if the user input matches the required phone nummber<o:p></o:p></p> <p class=MsoNormal>// pattern.<o:p></o:p></p> <p class=MsoNormal>// A pattern that matches a string comprising of 3 digits followed<o:p></o:p></p> <p class=MsoNormal>// by a '-' separator, followed by 3 digits again, followed by a<o:p></o:p></p> <p class=MsoNormal>//'-' separator and 4 digits after that.<o:p></o:p></p> <p class=MsoNormal>// Handle PhoneNumber to String conversion first.<o:p></o:p></p> <p class=MsoNormal>// If the conversion is other way around, check the<o:p></o:p></p> <p class=MsoNormal>// input pattern.<o:p></o:p></p> <p class=MsoNormal>if (!pattern.matcher((String) value).matches()) {<o:p></o:p></p> <p class=MsoNormal>// If the pattern does not match, throw ConversionException<o:p></o:p></p> <p class=MsoNormal>throw new ConversionException("Supplied value " + value<o:p></o:p></p> <p class=MsoNormal>+ " does not match the pattern " + pattern.toString());<o:p></o:p></p> <p class=MsoNormal>} //..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public static final ITypeConverter INSTANCE = new PhoneNumberConverter();<o:p></o:p></p> <p class=MsoNormal>@Override<o:p></o:p></p> <p class=MsoNormal>protected Class getTargetType() {<o:p></o:p></p> <p class=MsoNormal>return UserProfile.PhoneNumber.class;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>53<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public static final ITypeConverter INSTANCE = new PhoneNumberConverter();<o:p></o:p></p> <p class=MsoNormal>@Override<o:p></o:p></p> <p class=MsoNormal>protected Class getTargetType() {<o:p></o:p></p> <p class=MsoNormal>return PhoneNumber.class;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>UserProfile.PhoneNumber phoneNumber = new UserProfile.PhoneNumber(<o:p></o:p></p> <p class=MsoNormal>areaCode, prefix, number);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>UPhoneNumber phoneNumber = new PhoneNumber(areaCode, prefix, number);<o:p></o:p></p> <p class=MsoNormal>return phoneNumber;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-16. CustomConverter.java<o:p></o:p></p> <p class=MsoNormal>class CustomConverter extends Converter {<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 2-16. CustomConverter.java<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.validation;<o:p></o:p></p> <p class=MsoNormal>public class CustomConverter extends Converter {<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public class PhoneNumber implements Serializable{<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>public String toString(){<o:p></o:p></p> <p class=MsoNormal>return getPrefix() + "-" + getAreaCode() + "-"<o:p></o:p></p> <p class=MsoNormal>+ getNumber();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public class PhoneNumber implements Serializable{<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>public String toString(){<o:p></o:p></p> <p class=MsoNormal>return getAreaCode() + "-" + getPrefix() + "-"<o:p></o:p></p> <p class=MsoNormal>+ getNumber();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>63<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>import wicket.model.AbstractReadOnlyModel;<o:p></o:p></p> <p class=MsoNormal>IModel messagesModel=new AbstractReadOnlyModel() {<o:p></o:p></p> <p class=MsoNormal>// Wicket calls this method to get the actual "model object"<o:p></o:p></p> <p class=MsoNormal>// at runtime<o:p></o:p></p> <p class=MsoNormal>Object getObject(Component component) {<o:p></o:p></p> <p class=MsoNormal>return component.getPage().getFeedbackMessages(new<o:p></o:p></p> <p class=MsoNormal>ErrorLevelFeedabackMessageFilter(FeedbackMessage.ERROR));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>import wicket.model.AbstractReadOnlyModel;<o:p></o:p></p> <p class=MsoNormal>IModel messagesModel=new AbstractReadOnlyModel() {<o:p></o:p></p> <p class=MsoNormal>// Wicket calls this method to get the actual "model object"<o:p></o:p></p> <p class=MsoNormal>// at runtime<o:p></o:p></p> <p class=MsoNormal>public Object getObject(Component component) {<o:p></o:p></p> <p class=MsoNormal>return component.getPage().getFeedbackMessages().<o:p></o:p></p> <p class=MsoNormal>messages(<o:p></o:p></p> <p class=MsoNormal>new ErrorLevelFeedbackMessageFilter(<o:p></o:p></p> <p class=MsoNormal>FeedbackMessage.ERROR));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>FeedbackMessage message = (FeedbackMessage)item.getModelObject();<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>FeedbackMessage message = (FeedbackMessage)listitem.getModelObject();<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>67<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>http://localhost:8080/helloworld/app?wicket:bookmarkablePage=:com.apress.wicketbook.<o:p></o:p></p> <p class=MsoNormal>forms.Login<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>http://localhost:8080/wicket/helloworld?wicket:bookmarkablePage=:com.apress.wicketbo<o:p></o:p></p> <p class=MsoNormal>ok.forms.Login<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>68<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now you just need to enter the URL http://localhost:8080/helloworld/app/login to<o:p></o:p></p> <p class=MsoNormal>access the login page.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now you just need to enter the URL http://localhost:8080/wicket/helloworld/loginh to<o:p></o:p></p> <p class=MsoNormal>access the login page.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now you can enter the various URLs to access the different pages:<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/helloworld/app/pages/Login to access the login page.<o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/helloworld/app/pages/UserProfilePage to access the user profile page.<o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/helloworld/app/pages/Welcome/userId/Igor to access the<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>Welcome page, passing in the page parameter corresponding to userId. Of course, for<o:p></o:p></p> <p class=MsoNormal>this to work, the Welcome page should have a constructor that accepts page parameters,<o:p></o:p></p> <p class=MsoNormal>and you did accommodate this requirement in the first chapter.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Now you can enter the various URLs to access the different pages:<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/wicket/helloworld/pages/Login to access the login page.<o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/wicket/helloworld/pages/UserProfilePage to access the user<o:p></o:p></p> <p class=MsoNormal>profile page.<o:p></o:p></p> <p class=MsoNormal>¥ http://localhost:8080/wicket/helloworld/pages/Welcome/userId/Igor to access the<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>Welcome page, passing in the page parameter corresponding to userId. Of course, for<o:p></o:p></p> <p class=MsoNormal>this to work, the Welcome page should have a constructor that accepts page parameters,<o:p></o:p></p> <p class=MsoNormal>and you did accommodate this requirement in the first chapter.<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>69<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>if (userId == null || user.trim().length() == 0)<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>if (userId == null || userId.trim().length() == 0)<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>/* Some publishers */<o:p></o:p></p> <p class=MsoNormal>private static String APRESS = "Apress";<o:p></o:p></p> <p class=MsoNormal>private static String MANNING = "Manning";<o:p></o:p></p> <p class=MsoNormal>private static String OREILLY = "Oreilly";<o:p></o:p></p> <p class=MsoNormal>/* Some categories */<o:p></o:p></p> <p class=MsoNormal>private static String CATEGORY_J2EE = "J2EE";<o:p></o:p></p> <p class=MsoNormal>private static String CATEGORY_SCRIPTING = "Scripting";<o:p></o:p></p> <p class=MsoNormal>private static String CATEGORY_ALL = "All";<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>/* Some publishers */<o:p></o:p></p> <p class=MsoNormal>public static String APRESS = "Apress";<o:p></o:p></p> <p class=MsoNormal>public static String MANNING = "Manning";<o:p></o:p></p> <p class=MsoNormal>public static String OREILLY = "Oreilly";<o:p></o:p></p> <p class=MsoNormal>/* Some categories */<o:p></o:p></p> <p class=MsoNormal>public static String CATEGORY_J2EE = "J2EE";<o:p></o:p></p> <p class=MsoNormal>public static String CATEGORY_SCRIPTING = "Scripting";<o:p></o:p></p> <p class=MsoNormal>public static String CATEGORY_ALL = "All";<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public ISessionFactory getSessionFactory(){<o:p></o:p></p> <p class=MsoNormal>return new ISessionFactory(){<o:p></o:p></p> <p class=MsoNormal>public Session newSession(){<o:p></o:p></p> <p class=MsoNormal>return new BookStoreSession(BookStoreApplication.this);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Class getHomePage() {<o:p></o:p></p> <p class=MsoNormal>return ViewBooks.class;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>// Rename the HelloWorldSession class<o:p></o:p></p> <p class=MsoNormal>// in the Listing 3-5 to BookStoreSession.<o:p></o:p></p> <p class=MsoNormal>public ISessionFactory getSessionFactory(){<o:p></o:p></p> <p class=MsoNormal>return new ISessionFactory(){<o:p></o:p></p> <p class=MsoNormal>public Session newSession(){<o:p></o:p></p> <p class=MsoNormal>return new BookStoreSession(BookStoreApplication.this);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Rename the HelloWorldSession class<o:p></o:p></p> <p class=MsoNormal>// in the Listing 3-5 to BookStoreSession.<o:p></o:p></p> <p class=MsoNormal>public Class getHomePage() {<o:p></o:p></p> <p class=MsoNormal>return ViewBooks.class;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>86<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>DropDownChoice categories = new CategoryDropDownChoice("categories",<o:p></o:p></p> <p class=MsoNormal>new PropertyModel(dataProvider, "category"),<o:p></o:p></p> <p class=MsoNormal>getBookCategories(),books);<o:p></o:p></p> <p class=MsoNormal>// The drop-down should show a valid value selected.<o:p></o:p></p> <p class=MsoNormal>categories.setNullValid(false);<o:p></o:p></p> <p class=MsoNormal>final DataView books = new BookDataView("books", dataProvider);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>final DataView books = new BookDataView("books", dataProvider);<o:p></o:p></p> <p class=MsoNormal>DropDownChoice categories = new CategoryDropDownChoice("categories",<o:p></o:p></p> <p class=MsoNormal>new PropertyModel(dataProvider, "category"),<o:p></o:p></p> <p class=MsoNormal>getBookCategories(),books);<o:p></o:p></p> <p class=MsoNormal>// The drop-down should show a valid value selected.<o:p></o:p></p> <p class=MsoNormal>categories.setNullValid(false);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>105<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public Checkout(List checkoutBooksIds) {<o:p></o:p></p> <p class=MsoNormal>addBooksToCart(checkoutBooksIds);<o:p></o:p></p> <p class=MsoNormal>cart = ((BookStoreSession)getSession()).getCart();<o:p></o:p></p> <p class=MsoNormal>Form checkoutForm = new Form("checkoutForm");<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public Checkout(List checkoutBooksIds) {<o:p></o:p></p> <p class=MsoNormal>Form checkoutForm = new Form("checkoutForm");<o:p></o:p></p> <p class=MsoNormal>addBooksToCart(checkoutBooksIds);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>106<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>private void addBooksToCart(List booksMarkedForCheckout) {<o:p></o:p></p> <p class=MsoNormal>BookDao bookDao = ((BookStoreApplication) getApplication())<o:p></o:p></p> <p class=MsoNormal>.getBookDao();<o:p></o:p></p> <p class=MsoNormal>Cart cart = getCart();<o:p></o:p></p> <p class=MsoNormal>for (Iterator iter = booksMarkedForCheckout.iterator(); iter.hasNext();) {<o:p></o:p></p> <p class=MsoNormal>int bookId = ((Integer) iter.next()).intValue();<o:p></o:p></p> <p class=MsoNormal>if (!cart.containsBook(bookId)) {<o:p></o:p></p> <p class=MsoNormal>Book book = bookDao.getBook(bookId);<o:p></o:p></p> <p class=MsoNormal>cart.addToCart(new CheckoutBook(book));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>private void addBooksToCart(List booksMarkedForCheckout) {<o:p></o:p></p> <p class=MsoNormal>BookDao bookDao = ((BookStoreApplication) getApplication())<o:p></o:p></p> <p class=MsoNormal>.getBookDao();<o:p></o:p></p> <p class=MsoNormal>Cart cart = getCart();<o:p></o:p></p> <p class=MsoNormal>for (Iterator iter = booksMarkedForCheckout.iterator(); iter.hasNext();) {<o:p></o:p></p> <p class=MsoNormal>int bookId = ((Integer) iter.next()).intValue();<o:p></o:p></p> <p class=MsoNormal>if (!cart.containsBook(bookId)) {<o:p></o:p></p> <p class=MsoNormal>Book book = bookDao.getBook(bookId);<o:p></o:p></p> <p class=MsoNormal>cart.addToCart(new CheckoutBook(book));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Cart getCart() {<o:p></o:p></p> <p class=MsoNormal>return cart;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>112<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>In this case, any page that carries the SecuredWicketPage marker annotation shown in<o:p></o:p></p> <p class=MsoNormal>Listing 3-40 is automatically considered secured.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>In this case, any page that carries the SecuredWicketPage marker annotation shown in<o:p></o:p></p> <p class=MsoNormal>Listing 3-40 is automatically considered secured. Mark the Confirmation page as 'secured'<o:p></o:p></p> <p class=MsoNormal>through this class level annotation.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>114<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>throw new RestartResponseAtInterceptPageException(SignOnPage.class);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>throw new RestartResponseAtInterceptPageException(Login.class);<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>127<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>add(new Label("label", new Model(" Wicket Rocks 8-) ");<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>add(new Label("label", new Model(" Wicket Rocks 8-) ")));<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>130<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Border border = new MyBorder("myborder")<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Border border = new MyBorder("myborder");<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>136<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal></wicket:link/><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal></table><o:p></o:p></p> <p class=MsoNormal></td><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal><tr><o:p></o:p></p> <p class=MsoNormal><td valign="top" colspan="3" class="borderedBlock"><o:p></o:p></p> <p class=MsoNormal><wicket:child/><o:p></o:p></p> <p class=MsoNormal></td><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal></wicket:link><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal></table><o:p></o:p></p> <p class=MsoNormal></td><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal><tr><o:p></o:p></p> <p class=MsoNormal><td valign="top" colspan="3" class="borderedBlock"><o:p></o:p></p> <p class=MsoNormal><wicket:child/><o:p></o:p></p> <p class=MsoNormal></td><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>147<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>new PropertyModel(bookDetailsModel, "category"),<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>new PropertyModel(this, "category"),<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>148<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal></th><o:p></o:p></p> <p class=MsoNormal><#list bookList as book><o:p></o:p></p> <p class=MsoNormal><tr><o:p></o:p></p> <p class=MsoNormal><td>${book.title}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.author}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.publisher}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.price}</td><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal></#list><o:p></o:p></p> <p class=MsoNormal></table><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal><#list bookList as book><o:p></o:p></p> <p class=MsoNormal><tr><o:p></o:p></p> <p class=MsoNormal><td>${book.title}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.author}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.publisher}</td><o:p></o:p></p> <p class=MsoNormal><td>${book.price}</td><o:p></o:p></p> <p class=MsoNormal></tr><o:p></o:p></p> <p class=MsoNormal></#list><o:p></o:p></p> <p class=MsoNormal></table><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>162<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>// Directly look up categories using bookDao.<o:p></o:p></p> <p class=MsoNormal>DropDownChoice categories = new CategoryDropDownChoice("categories",<o:p></o:p></p> <p class=MsoNormal>new PropertyModel(this, "category"), bookDao.getAllCategories());<o:p></o:p></p> <p class=MsoNormal>form.add(categories);<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>// Directly look up categories using bookDao.<o:p></o:p></p> <p class=MsoNormal>DropDownChoice categories = new CategoryDropDownChoice("categories",<o:p></o:p></p> <p class=MsoNormal>new PropertyModel(dataProvider, "category"),<o:p></o:p></p> <p class=MsoNormal>bookDao.getSupportedCategories());<o:p></o:p></p> <p class=MsoNormal>form.add(categories);<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>163<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-16. BookWithDI.html<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-16. BooksWithDI.html<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>166<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-19. Book Bean Converted to EJB 3 Entity Bean Using annotationspackagecom.<o:p></o:p></p> <p class=MsoNormal>apress.wicketbook.shop.model;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import java.io.Serializable;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>/** EJB3 imports **/<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Basic;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Column;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Entity;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.GeneratedValue;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.GenerationType;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Id;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Table;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-19. Book Bean Converted to EJB 3 Entity Bean Using annotationspackagecom.<o:p></o:p></p> <p class=MsoNormal>apress.wicketbook.common;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>/** EJB3 imports **/<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import java.io.Serializable;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Basic;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Column;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Entity;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.GeneratedValue;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.GenerationType;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Id;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Table;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>@Basic<o:p></o:p></p> <p class=MsoNormal>@Column(name="CATEGORY", nullable=false,updatable=false)<o:p></o:p></p> <p class=MsoNormal>protected String category;<o:p></o:p></p> <p class=MsoNormal>public Book(){ }<o:p></o:p></p> <p class=MsoNormal>/** The rest is the same as the Book class you developed in Chapter 3 **/<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>@Column(name="CATEGORY", nullable=false,updatable=false)<o:p></o:p></p> <p class=MsoNormal>protected String category;<o:p></o:p></p> <p class=MsoNormal>// Since we annotated the 'id' attribute as a 'auto generated' column,<o:p></o:p></p> <p class=MsoNormal>// the EJB3 container will generate the unique value for<o:p></o:p></p> <p class=MsoNormal>// 'id' when persisting the Book instance. Make sure that<o:p></o:p></p> <p class=MsoNormal>// you comment the code that generates the id in the<o:p></o:p></p> <p class=MsoNormal>// Book constructor.<o:p></o:p></p> <p class=MsoNormal>public Book(){ }<o:p></o:p></p> <p class=MsoNormal>/** The rest is the same as the Book class you developed in Chapter 3 **/<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-20. persistence.xml As Required by EJB 3 Specification<o:p></o:p></p> <p class=MsoNormal><persistence><o:p></o:p></p> <p class=MsoNormal><persistence-unit name="wicketPersistenceManager" transactiontype="<o:p></o:p></p> <p class=MsoNormal>RESOURCE_LOCAL"><o:p></o:p></p> <p class=MsoNormal><!--the bean that needs to be persisted --><o:p></o:p></p> <p class=MsoNormal><class>com.apress.wicketbook.shop.model.Book</class><o:p></o:p></p> <p class=MsoNormal><!--<o:p></o:p></p> <p class=MsoNormal>Vendor specific properties goes here. You will use Hibernate3 EJB3<o:p></o:p></p> <p class=MsoNormal>implementation with HSQL Db configured<o:p></o:p></p> <p class=MsoNormal>--><o:p></o:p></p> <p class=MsoNormal><properties><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/><o:p></o:p></p> <p class=MsoNormal><property name=<o:p></o:p></p> <p class=MsoNormal>"hibernate.connection.driver_class"value="org.hsqldb.jdbcDriver"/><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-20. persistence.xml As Required by EJB 3 Specification<o:p></o:p></p> <p class=MsoNormal><persistence><o:p></o:p></p> <p class=MsoNormal><persistence-unit name="wicketPersistenceManager" transactiontype="<o:p></o:p></p> <p class=MsoNormal>RESOURCE_LOCAL"><o:p></o:p></p> <p class=MsoNormal><!--the bean that needs to be persisted --><o:p></o:p></p> <p class=MsoNormal><class>com.apress.wicketbook.common.Book</class><o:p></o:p></p> <p class=MsoNormal><!--<o:p></o:p></p> <p class=MsoNormal>Vendor specific properties goes here. You will use Hibernate3 EJB3<o:p></o:p></p> <p class=MsoNormal>implementation with HSQL Db configured<o:p></o:p></p> <p class=MsoNormal>--><o:p></o:p></p> <p class=MsoNormal><properties><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>168<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><property name="hibernate.connection.username" value="sa"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.connection.password" value=""/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.connection.url" value="jdbc:hsqldb:."/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.max_fetch_depth" value="3"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.hbm2ddl.auto" value="create-drop"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.show_sql">true</property><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.jdbc.batch_size" value="0"/><o:p></o:p></p> <p class=MsoNormal></properties><o:p></o:p></p> <p class=MsoNormal></persistence-unit><o:p></o:p></p> <p class=MsoNormal></persistence><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><property name=<o:p></o:p></p> <p class=MsoNormal>"hibernate.connection.driver_class"value="org.hsqldb.jdbcDriver"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.connection.username" value="sa"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.connection.password" value=""/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.connection.url" value="jdbc:hsqldb:."/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.max_fetch_depth" value="3"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.hbm2ddl.auto" value="create-drop"/><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.show_sql">true</property><o:p></o:p></p> <p class=MsoNormal><property name="hibernate.jdbc.batch_size" value="0"/><o:p></o:p></p> <p class=MsoNormal></properties><o:p></o:p></p> <p class=MsoNormal></persistence-unit><o:p></o:p></p> <p class=MsoNormal></persistence><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-21. IBookDao Implementation Using Hibernate 3<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.integration;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import java.util.Arrays;<o:p></o:p></p> <p class=MsoNormal>import java.util.List;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>// EJB 3 imports<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityManager;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityManagerFactory;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityTransaction;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Query;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import com.apress.wicketbook.shop.model.Book;<o:p></o:p></p> <p class=MsoNormal>import com.apress.wicketbook.shop.model.IBookDao;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>public class HibernateBookDao implements IBookDao {<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>private EntityManagerFactory entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>public HibernateBookDao(EntityManagerFactory entityManagerFactory) {<o:p></o:p></p> <p class=MsoNormal>this.entityManagerFactory = entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Rob Harrop", CATEGORY_J2EE, "Pro Spring", 30.00f,<o:p></o:p></p> <p class=MsoNormal>APRESS));<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Damian Conway", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Object Oriented Perl", 40.00f, MANNING));<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-21. IBookDao Implementation Using Hibernate 3<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.integration;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import java.util.Arrays;<o:p></o:p></p> <p class=MsoNormal>import java.util.List;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>// EJB 3 imports<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityManager;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityManagerFactory;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.EntityTransaction;<o:p></o:p></p> <p class=MsoNormal>import javax.persistence.Query;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>import com.apress.wicketbook.model.Book;<o:p></o:p></p> <p class=MsoNormal>import com.apress.wicketbook.shop.model.IBookDao;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>// Refer to the downloadable source code for<o:p></o:p></p> <p class=MsoNormal>// complete Listing<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>public class HibernateBookDao implements IBookDao {<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>private EntityManagerFactory entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>public HibernateBookDao(EntityManagerFactory entityManagerFactory) {<o:p></o:p></p> <p class=MsoNormal>this.entityManagerFactory = entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Rob Harrop", CATEGORY_J2EE, "Pro Spring", 30.00f,<o:p></o:p></p> <p class=MsoNormal>APRESS));<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Damian Conway", CATEGORY_SCRIPTING,<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>169<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public List getBooksForCategory(String category, int start, int count) {<o:p></o:p></p> <p class=MsoNormal>EntityManager manager = getEntityManager();<o:p></o:p></p> <p class=MsoNormal>try {<o:p></o:p></p> <p class=MsoNormal>Query query = manager.createQuery(<o:p></o:p></p> <p class=MsoNormal>" select book from Book book where book.category=?1")<o:p></o:p></p> <p class=MsoNormal>.setParameter(1, category).setFirstResult(start).setMaxResults(count);<o:p></o:p></p> <p class=MsoNormal>return query.getResultList();<o:p></o:p></p> <p class=MsoNormal>} finally {<o:p></o:p></p> <p class=MsoNormal>manager.close();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>public List getBooksForCategory(String category, int start, int count) {<o:p></o:p></p> <p class=MsoNormal>EntityManager manager = getEntityManager();<o:p></o:p></p> <p class=MsoNormal>if (CATEGORY_ALL.equals(category)){<o:p></o:p></p> <p class=MsoNormal>return findAllBooks(start,count);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>try {<o:p></o:p></p> <p class=MsoNormal>Query query = manager.createQuery(<o:p></o:p></p> <p class=MsoNormal>" select book from Book book where book.category=?1")<o:p></o:p></p> <p class=MsoNormal>.setParameter(1, category).setFirstResult(start).setMaxResults(count);<o:p></o:p></p> <p class=MsoNormal>return query.getResultList();<o:p></o:p></p> <p class=MsoNormal>} finally {<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>721<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>try {<o:p></o:p></p> <p class=MsoNormal>entityManagerFactory = Persistence<o:p></o:p></p> <p class=MsoNormal>.createEntityManagerFactory("wicketPersistenceManager");<o:p></o:p></p> <p class=MsoNormal>return entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal>} catch (Throwable ex) {<o:p></o:p></p> <p class=MsoNormal>throw new BeanCreationException(<o:p></o:p></p> <p class=MsoNormal>"Error creating EntityManagerFactory ", ex);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>try {<o:p></o:p></p> <p class=MsoNormal>entityManagerFactory = Persistence<o:p></o:p></p> <p class=MsoNormal>.createEntityManagerFactory("wicketPersistenceManager");<o:p></o:p></p> <p class=MsoNormal>return entityManagerFactory;<o:p></o:p></p> <p class=MsoNormal>} catch (Throwable ex) {<o:p></o:p></p> <p class=MsoNormal>throw new BeanCreationException(<o:p></o:p></p> <p class=MsoNormal>"Error creating EntityManagerFactory ", ex);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>//Specify the type of the object this FactoryBean<o:p></o:p></p> <p class=MsoNormal>//will return<o:p></o:p></p> <p class=MsoNormal>public Class getObjectType() {<o:p></o:p></p> <p class=MsoNormal>return EntityManagerFactory.class;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Whether the value the FactoryBean returns<o:p></o:p></p> <p class=MsoNormal>// needs to be cached<o:p></o:p></p> <p class=MsoNormal>public boolean isSingleton() {<o:p></o:p></p> <p class=MsoNormal>return true;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>173-174<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-24. IBookDao Implementation Using Spring 2.0 and EJB 3 Based on Hibernate<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.integration;<o:p></o:p></p> <p class=MsoNormal>// Other imports<o:p></o:p></p> <p class=MsoNormal>// Spring 2.0 imports<o:p></o:p></p> <p class=MsoNormal>import org.springframework.orm.jpa.JpaCallback;<o:p></o:p></p> <p class=MsoNormal>import org.springframework.orm.jpa.support.JpaDaoSupport;<o:p></o:p></p> <p class=MsoNormal>public class Spring2EJB3BookDao extends JpaDaoSupport implements IBookDao{<o:p></o:p></p> <p class=MsoNormal>public void addBook(final Book book) {<o:p></o:p></p> <p class=MsoNormal>getJpaTemplate().persist(book);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Book getBook(final int id) {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find(Book.class, new Integer(id));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List getBooksForCategory(final String category, final int start,<o:p></o:p></p> <p class=MsoNormal>final int count) {<o:p></o:p></p> <p class=MsoNormal>return (List) getJpaTemplate().execute(<o:p></o:p></p> <p class=MsoNormal>new JpaCallback() {<o:p></o:p></p> <p class=MsoNormal>public Object doInJpa(EntityManager manager)<o:p></o:p></p> <p class=MsoNormal>throws PersistenceException {<o:p></o:p></p> <p class=MsoNormal>Query query = manager.createQuery(<o:p></o:p></p> <p class=MsoNormal>" select book from Book book where book.category=?1")<o:p></o:p></p> <p class=MsoNormal>.setParameter(1, category).setFirstResult(start)<o:p></o:p></p> <p class=MsoNormal>.setMaxResults(count);<o:p></o:p></p> <p class=MsoNormal>return query.getResultList();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public int getBookCount(final String category) {<o:p></o:p></p> <p class=MsoNormal>Integer count = (Integer)getJpaTemplate().execute(new JpaCallback() {<o:p></o:p></p> <p class=MsoNormal>public Object doInJpa(EntityManager manager)<o:p></o:p></p> <p class=MsoNormal>throws PersistenceException {<o:p></o:p></p> <p class=MsoNormal>Query query = manager<o:p></o:p></p> <p class=MsoNormal>.createQuery("select count(*) from Book where category = ?1");<o:p></o:p></p> <p class=MsoNormal>query.setParameter(1, category);<o:p></o:p></p> <p class=MsoNormal>return query.getSingleResult();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>});<o:p></o:p></p> <p class=MsoNormal>return count.intValue();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List findBooksForCategory(String category) {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find(<o:p></o:p></p> <p class=MsoNormal>"select book from Book as book where book.category = ?1",<o:p></o:p></p> <p class=MsoNormal>category);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List findAllBooks() {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find("select book from Book as book");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Other method implementations are not shown here but are available in the book's<o:p></o:p></p> <p class=MsoNormal>// source code.<o:p></o:p></p> <p class=MsoNormal>/*<o:p></o:p></p> <p class=MsoNormal>* Concrete subclasses can override this for custom initialization behavior.<o:p></o:p></p> <p class=MsoNormal>* Gets called after population of this instance's bean properties by Spring's<o:p></o:p></p> <p class=MsoNormal>* JpaDaoSupport class. In this case, the Dao initialization routine goes here.<o:p></o:p></p> <p class=MsoNormal>*<o:p></o:p></p> <p class=MsoNormal>*/<o:p></o:p></p> <p class=MsoNormal>protected void initDao(){<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Rob Harrop", CATEGORY_J2EE, "Pro Spring", 30.00f,<o:p></o:p></p> <p class=MsoNormal>APRESS));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Damian Conway", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Object Oriented Perl", 40.00f, MANNING));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Ted Husted", CATEGORY_J2EE, "Struts In Action",<o:p></o:p></p> <p class=MsoNormal>40.00f, MANNING));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Alex Martelli", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Python in a Nutshell", 35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Larry Wall", CATEGORY_SCRIPTING, "Programming Perl",<o:p></o:p></p> <p class=MsoNormal>35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Alex Martelli", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Python Cookbook", 35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 5-24. IBookDao Implementation Using Spring 2.0 and EJB 3 Based on Hibernate<o:p></o:p></p> <p class=MsoNormal>package com.apress.wicketbook.integration;<o:p></o:p></p> <p class=MsoNormal>// Other imports<o:p></o:p></p> <p class=MsoNormal>// Spring 2.0 imports<o:p></o:p></p> <p class=MsoNormal>import org.springframework.orm.jpa.JpaCallback;<o:p></o:p></p> <p class=MsoNormal>import org.springframework.orm.jpa.support.JpaDaoSupport;<o:p></o:p></p> <p class=MsoNormal>// Refer to the downloadable source code for<o:p></o:p></p> <p class=MsoNormal>// complete Listing<o:p></o:p></p> <p class=MsoNormal>public class Spring2EJB3BookDao extends JpaDaoSupport implements IBookDao{<o:p></o:p></p> <p class=MsoNormal>public void addBook(final Book book) {<o:p></o:p></p> <p class=MsoNormal>getJpaTemplate().persist(book);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public Book getBook(final int id) {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find(Book.class, new Integer(id));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List getBooksForCategory(final String category, final int start,<o:p></o:p></p> <p class=MsoNormal>final int count) {<o:p></o:p></p> <p class=MsoNormal>if (CATEGORY_ALL.equals(category)) {<o:p></o:p></p> <p class=MsoNormal>return findAllBooks(start,count);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>return (List) getJpaTemplate().execute(<o:p></o:p></p> <p class=MsoNormal>new JpaCallback() {<o:p></o:p></p> <p class=MsoNormal>public Object doInJpa(EntityManager manager)<o:p></o:p></p> <p class=MsoNormal>throws PersistenceException {<o:p></o:p></p> <p class=MsoNormal>Query query = manager.createQuery(<o:p></o:p></p> <p class=MsoNormal>" select book from Book book where book.category=?1")<o:p></o:p></p> <p class=MsoNormal>.setParameter(1, category).setFirstResult(start)<o:p></o:p></p> <p class=MsoNormal>.setMaxResults(count);<o:p></o:p></p> <p class=MsoNormal>return query.getResultList();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public int getBookCount(final String category) {<o:p></o:p></p> <p class=MsoNormal>Long count = (Integer)getJpaTemplate().execute(new JpaCallback() {<o:p></o:p></p> <p class=MsoNormal>public Object doInJpa(EntityManager manager)<o:p></o:p></p> <p class=MsoNormal>throws PersistenceException {<o:p></o:p></p> <p class=MsoNormal>Query query = manager<o:p></o:p></p> <p class=MsoNormal>.createQuery("select count(*) from Book where category = ?1");<o:p></o:p></p> <p class=MsoNormal>query.setParameter(1, category);<o:p></o:p></p> <p class=MsoNormal>return query.getSingleResult();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>});<o:p></o:p></p> <p class=MsoNormal>return count.intValue();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List findBooksForCategory(String category) {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find(<o:p></o:p></p> <p class=MsoNormal>"select book from Book as book where book.category = ?1",<o:p></o:p></p> <p class=MsoNormal>category);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public List findAllBooks() {<o:p></o:p></p> <p class=MsoNormal>return getJpaTemplate().find("select book from Book as book");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Other method implementations are not shown here but are available in the book's<o:p></o:p></p> <p class=MsoNormal>// source code.<o:p></o:p></p> <p class=MsoNormal>/*<o:p></o:p></p> <p class=MsoNormal>* Concrete subclasses can override this for custom initialization behavior.<o:p></o:p></p> <p class=MsoNormal>* Gets called after population of this instance's bean properties by Spring's<o:p></o:p></p> <p class=MsoNormal>* JpaDaoSupport class. In this case, the Dao initialization routine goes here.<o:p></o:p></p> <p class=MsoNormal>*<o:p></o:p></p> <p class=MsoNormal>*/<o:p></o:p></p> <p class=MsoNormal>protected void initDao(){<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Rob Harrop", CATEGORY_J2EE, "Pro Spring", 30.00f,<o:p></o:p></p> <p class=MsoNormal>APRESS));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Damian Conway", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Object Oriented Perl", 40.00f, MANNING));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Ted Husted", CATEGORY_J2EE, "Struts In Action",<o:p></o:p></p> <p class=MsoNormal>40.00f, MANNING));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Alex Martelli", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Python in a Nutshell", 35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Larry Wall", CATEGORY_SCRIPTING, "Programming Perl",<o:p></o:p></p> <p class=MsoNormal>35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>addBook(new Book("Alex Martelli", CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>"Python Cookbook", 35.00f, OREILLY));<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>On refresh, right-click, select View Source, and you should see something<o:p></o:p></p> <p class=MsoNormal>similar to Listing 6-11.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>On refresh, right-click, select View Source, and you should see something<o:p></o:p></p> <p class=MsoNormal>similar to Listing 6-11. Make sure that the corresponding DropDownChoice component<o:p></o:p></p> <p class=MsoNormal>is configured with the renderer:<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 6-11. On Selecting View Source<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>//Maintain a static List of Country Locales<o:p></o:p></p> <p class=MsoNormal>private static final List COUNTRIES = Arrays.asList(new Locale[] {<o:p></o:p></p> <p class=MsoNormal>Locale.US, new Locale("es", "ES"), Locale.UK, new Locale("hi", "IN") });<o:p></o:p></p> <p class=MsoNormal>//Configure DropDownChoice with the Renderer<o:p></o:p></p> <p class=MsoNormal>DropDownChoice countriesComp = new DropDownChoice("country",<o:p></o:p></p> <p class=MsoNormal>COUNTRIES ,new CountryRenderer());<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> <p class=MsoNormal>Listing 6-11. On Selecting View Source<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>final String url = urlFor(listenerInterface).toString();<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>207<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>final String url = urlFor(MyOnChangeListener.INTERFACE)<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>protected Item newRowItem(final String id, int index, final IModel model){<o:p></o:p></p> <p class=MsoNormal>Item item = new Item(id, index, model);<o:p></o:p></p> <p class=MsoNormal>item.add(new AttributeModifier("class",true,<o:p></o:p></p> <p class=MsoNormal>new Model(index%2==0?"odd":"even")));<o:p></o:p></p> <p class=MsoNormal>return item;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>protected Item newRowItem(final String id, int index, final IModel model){<o:p></o:p></p> <p class=MsoNormal>Item item = new Item(id, index, model);<o:p></o:p></p> <p class=MsoNormal>item.add(new AttributeModifier("class",true,<o:p></o:p></p> <p class=MsoNormal>new Model(index%2==0?"odd":"even")));<o:p></o:p></p> <p class=MsoNormal>return item;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>Now you can get rid of the previously existing <span> element for the navigator and the<o:p></o:p></p> <p class=MsoNormal>table with the CSS style "dataview" from the ViewBooks.html template . You need to have this in the template instead:<o:p></o:p></p> <p class=MsoNormal><table border="1" wicket:id="books">[Table Component]</table><o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>If that seems like a lot of code, you can use DefaultDataTable instead. All of the code in<o:p></o:p></p> <p class=MsoNormal>Listing 7-13 translates to the following when using DefaultDataTable:<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>The DataTable component will take care of generating the table headers and rows for you.<o:p></o:p></p> <p class=MsoNormal>If that seems like a lot of code, you can use DefaultDataTable instead. All of the code in<o:p></o:p></p> <p class=MsoNormal>Listing 7-13 translates to the following when using DefaultDataTable:<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 7-30. BookDao Modified to Accommodate Display Filter<o:p></o:p></p> <p class=MsoNormal>public class BookDao implements Serializable{<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>List displayFilter;<o:p></o:p></p> <p class=MsoNormal>// Maintain copies of "all" and "select" categories.<o:p></o:p></p> <p class=MsoNormal>private void init(String[] cats) {<o:p></o:p></p> <p class=MsoNormal>categories = new ArrayList();<o:p></o:p></p> <p class=MsoNormal>for (int i = 0; i < cats.length; i++) {<o:p></o:p></p> <p class=MsoNormal>categories.add(cats[i]);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>displayFilter = (List)((ArrayList)categories).clone();<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public BookDao() {<o:p></o:p></p> <p class=MsoNormal>init(new String[] { CATEGORY_J2EE, CATEGORY_SCRIPTING,<o:p></o:p></p> <p class=MsoNormal>CATEGORY_ASP_NET, CATEGORY_DP, CATEGORY_ALL });<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// For now, you will not allow empty filters.<o:p></o:p></p> <p class=MsoNormal>public void setDisplayFilter(List displayFilter) {<o:p></o:p></p> <p class=MsoNormal>if (displayFilter != null && !displayFilter.isEmpty()) {<o:p></o:p></p> <p class=MsoNormal>if (displayFilter.contains(CATEGORY_ALL)) {<o:p></o:p></p> <p class=MsoNormal>displayFilter = categories;<o:p></o:p></p> <p class=MsoNormal>} else {<o:p></o:p></p> <p class=MsoNormal>this.displayFilter = displayFilter;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Listing 7-30. BookDao Modified to Accommodate Display Filter<o:p></o:p></p> <p class=MsoNormal>public class BookDao implements Serializable{<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>List displayFilter;<o:p></o:p></p> <p class=MsoNormal>// Maintain copies of "all" and "select" categories.<o:p></o:p></p> <p class=MsoNormal>private void initDisplayFilter( ){<o:p></o:p></p> <p class=MsoNormal>displayFilter = new ArrayList();<o:p></o:p></p> <p class=MsoNormal>for (int i = 0; i < categories.length; i++) {<o:p></o:p></p> <p class=MsoNormal>displayFilter.add(categories[i]);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>public BookDao() {<o:p></o:p></p> <p class=MsoNormal>initDisplayFilter ();<o:p></o:p></p> <p class=MsoNormal>//..<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// For now, you will not allow empty filters.<o:p></o:p></p> <p class=MsoNormal>public void setDisplayFilter(List displayFilter) {<o:p></o:p></p> <p class=MsoNormal>if (displayFilter != null && !displayFilter.isEmpty()) {<o:p></o:p></p> <p class=MsoNormal>if (displayFilter.contains(CATEGORY_ALL)) {<o:p></o:p></p> <p class=MsoNormal>displayFilter = categories;<o:p></o:p></p> <p class=MsoNormal>} else {<o:p></o:p></p> <p class=MsoNormal>this.displayFilter = displayFilter;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>236<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>Border addWithBorder(Form form,FormComponent component,String borderId){<o:p></o:p></p> <p class=MsoNormal>FormComponentFeedbackBorder border = new FormComponentFeedbackBorder(borderId);<o:p></o:p></p> <p class=MsoNormal>border.add(component);<o:p></o:p></p> <p class=MsoNormal>form.add(border);<o:p></o:p></p> <p class=MsoNormal>return border;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>FormComponentFeedbackBorder addWithBorder(Form form,FormComponent component,String<o:p></o:p></p> <p class=MsoNormal>borderId){<o:p></o:p></p> <p class=MsoNormal>FormComponentFeedbackBorder border = new FormComponentFeedbackBorder(borderId);<o:p></o:p></p> <p class=MsoNormal>border.add(component);<o:p></o:p></p> <p class=MsoNormal>form.add(border);<o:p></o:p></p> <p class=MsoNormal>return border;<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'>254<o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>final DropDownChoice stateComp = new DropDownChoice("state",statechoices);<o:p></o:p></p> <p class=MsoNormal>DropDownChoice countriesComp = new DropDownChoice("country",<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>final DropDownChoice stateComp = new DropDownChoice("state",statechoices);<o:p></o:p></p> <p class=MsoNormal>stateComp.setOutputMarkupId(true);<o:p></o:p></p> <p class=MsoNormal>DropDownChoice countriesComp = new DropDownChoice("country",<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>protected void onUpdate(AjaxRequestTarget target) {<o:p></o:p></p> <p class=MsoNormal>DropDownChoice dropDownChoice =<o:p></o:p></p> <p class=MsoNormal>(DropDownChoice)getFormComponent();<o:p></o:p></p> <p class=MsoNormal>// At the time of writing, the Wicket code<o:p></o:p></p> <p class=MsoNormal>// had the "access specifier" specified as "protected"<o:p></o:p></p> <p class=MsoNormal>// for this method. Nevertheless, you could modify the<o:p></o:p></p> <p class=MsoNormal>// source and change it to "public". The fact that<o:p></o:p></p> <p class=MsoNormal>// Wicket uses Maven for its build is of great help here.<o:p></o:p></p> <p class=MsoNormal>dropDownChoice.onSelectionChanged(target);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Since the above method internally calls<o:p></o:p></p> <p class=MsoNormal>// onSelectionChanged, make sure that the behavior<o:p></o:p></p> <p class=MsoNormal>// is being bound to a DropDownChoice.<o:p></o:p></p> <p class=MsoNormal>protected void onBind() {<o:p></o:p></p> <p class=MsoNormal>super.onBind();<o:p></o:p></p> <p class=MsoNormal>if (!(getComponent() instanceof DropDownChoice)) {<o:p></o:p></p> <p class=MsoNormal>throw new WicketRuntimeException(<o:p></o:p></p> <p class=MsoNormal>"Behavior "<o:p></o:p></p> <p class=MsoNormal>+ getClass().getName()<o:p></o:p></p> <p class=MsoNormal>+ " can only be added to an isntance of a DropDownChoice");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Retrieve the original onchange script added by the component<o:p></o:p></p> <p class=MsoNormal>// if present.<o:p></o:p></p> <p class=MsoNormal>protected void onComponentTag(final ComponentTag tag) {<o:p></o:p></p> <p class=MsoNormal>if (tag.getAttributes().containsKey("onchange")) {<o:p></o:p></p> <p class=MsoNormal>this.prevScript = tag.getAttributes().get("onchange")<o:p></o:p></p> <p class=MsoNormal>.toString();<o:p></o:p></p> <p class=MsoNormal>} else {<o:p></o:p></p> <p class=MsoNormal>prevScript = null;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Get the AjaxFormComponentUpdatingBehavior<o:p></o:p></p> <p class=MsoNormal>// to add its onchange event script.<o:p></o:p></p> <p class=MsoNormal>super.onComponentTag(tag);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>protected IAjaxCallDecorator getAjaxCallDecorator() {<o:p></o:p></p> <p class=MsoNormal>return new AjaxPostprocessingCallDecorator(null) {<o:p></o:p></p> <p class=MsoNormal>// On Ajax failure, execute the original onchange script added<o:p></o:p></p> <p class=MsoNormal>// by the component. This would trigger the normal<o:p></o:p></p> <p class=MsoNormal>// request.<o:p></o:p></p> <p class=MsoNormal>public CharSequence postDecorateOnFailureScript(<o:p></o:p></p> <p class=MsoNormal>CharSequence script) {<o:p></o:p></p> <p class=MsoNormal>if (prevScript != null)<o:p></o:p></p> <p class=MsoNormal>return script + ";" + prevScript;<o:p></o:p></p> <p class=MsoNormal>else<o:p></o:p></p> <p class=MsoNormal>return script + "";<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>protected void onUpdate(AjaxRequestTarget target) {<o:p></o:p></p> <p class=MsoNormal>AjaxFallbackDropDown dropDownChoice = (AjaxFallbackDropDown) getFormComponent();<o:p></o:p></p> <p class=MsoNormal>dropDownChoice.onSelectionChanged(<o:p></o:p></p> <p class=MsoNormal>dropDownChoice.getModelObject());<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Since the above method internally calls<o:p></o:p></p> <p class=MsoNormal>// onSelectionChanged, make sure that the behavior<o:p></o:p></p> <p class=MsoNormal>// is being bound to a DropDownChoice.<o:p></o:p></p> <p class=MsoNormal>protected void onBind() {<o:p></o:p></p> <p class=MsoNormal>super.onBind();<o:p></o:p></p> <p class=MsoNormal>if (!(getComponent() instanceof DropDownChoice)) {<o:p></o:p></p> <p class=MsoNormal>throw new WicketRuntimeException(<o:p></o:p></p> <p class=MsoNormal>"Behavior "<o:p></o:p></p> <p class=MsoNormal>+ getClass().getName()<o:p></o:p></p> <p class=MsoNormal>+ " can only be added to an isntance of a DropDownChoice");<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Retrieve the original onchange script added by the component<o:p></o:p></p> <p class=MsoNormal>// if present.<o:p></o:p></p> <p class=MsoNormal>protected void onComponentTag(final ComponentTag tag) {<o:p></o:p></p> <p class=MsoNormal>if (tag.getAttributes().containsKey("onchange")) {<o:p></o:p></p> <p class=MsoNormal>this.prevScript = tag.getAttributes().get("onchange")<o:p></o:p></p> <p class=MsoNormal>.toString();<o:p></o:p></p> <p class=MsoNormal>} else {<o:p></o:p></p> <p class=MsoNormal>prevScript = null;<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>// Get the AjaxFormComponentUpdatingBehavior<o:p></o:p></p> <p class=MsoNormal>// to add its onchange event script.<o:p></o:p></p> <p class=MsoNormal>super.onComponentTag(tag);<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>protected IAjaxCallDecorator getAjaxCallDecorator() {<o:p></o:p></p> <p class=MsoNormal>return new AjaxPostprocessingCallDecorator(null) {<o:p></o:p></p> <p class=MsoNormal>// On Ajax failure, execute the original onchange script added<o:p></o:p></p> <p class=MsoNormal>// by the component. This would trigger the normal<o:p></o:p></p> <p class=MsoNormal>// request.<o:p></o:p></p> <p class=MsoNormal>public CharSequence postDecorateOnFailureScript(<o:p></o:p></p> <p class=MsoNormal>CharSequence script) {<o:p></o:p></p> <p class=MsoNormal>if (prevScript != null)<o:p></o:p></p> <p class=MsoNormal>return script + ";" + prevScript;<o:p></o:p></p> <p class=MsoNormal>else<o:p></o:p></p> <p class=MsoNormal>return script + "";<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>};<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal>}<o:p></o:p></p> <p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Original Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>You could test this behavior by having a basic template with HTML <form> and <select><o:p></o:p></p> <p class=MsoNormal>elements. In the Page class, make sure that you use AjaxFallbackDropDown in place of the<o:p></o:p></p> <p class=MsoNormal>DropDownChoice component and have DropDownChoice.wantOnSelectionChangeNotifications()<o:p></o:p></p> <p class=MsoNormal>return true.<o:p></o:p></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal><b>Corrected Text</b><span style='font-weight:normal'><o:p></o:p></span></p> </td> </tr> <tr> <td width=50 style='width:.7in;border:solid gray 1.0pt;border-top:none; mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]> <![endif]><o:p></o:p></p> </td> <td width=455 style='width:454.5pt;border-top:none;border-left:none; border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal>You could test this behavior by having a basic template with HTML <form> and <select><o:p></o:p></p> <p class=MsoNormal>elements. In the Page class, make sure that you use AjaxFallbackDropDown in place of the<o:p></o:p></p> <p class=MsoNormal>DropDownChoice.<o:p></o:p></p> </td> </tr></table><p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p></div></body></html>