Your SlideShare is downloading. ×
0
PrettyFaces Client-facing JSF – Lincoln Baxter, III
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul>
PrettyFaces is: Url Rewriting http://example.com/faces/store .jsf http://example.com/ store
PrettyFaces is: Url Parameterization http://example.com/store/item/ Z34SD498
PrettyFaces is: Declarative Data Loading <action>  #{storeBean.loadItem}  </action>
PrettyFaces is: Simplified Navigation “ viewStore ” -> http://example.com/store
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul>
The PrettyFaces Story Lincoln Baxter, III PrettyFaces/PrettyTime Founder of  O cpSoft
The PrettyFaces Story Lincoln Baxter, III Founder of  O cpSoft @lincolnthree http://ocpsoft.com http://scrumshark.com http...
The Problem <ul><li>JSF1.x </li><ul><li>Good separation between M & V of MVC
Had usability issues, pitfalls
Navigation was a pain...
No bookmarks? Not entirely true.
What about Pretty URLs / SEO? </li></ul></ul>
The Result <ul><li>Took a while </li><ul><li>Tried a few other tools
Applied the 80/20 rule
Destroyed Thanksgiving 2008 </li></ul></ul>
The Result <ul><li>Came out with a Gem:  PrettyFaces </li><ul><li>URLs were clean, search optimized
Faces-config practically gone
Data loading easy & declarative </li></ul></ul>Easy, Bookmarkable JSF
:) Life is good
Why do we need Pretty URLs? <ul><li>Build Trust
Enhance User Experience
Self-Promote </li></ul>
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul>
Rethinking Navigation The Basics Keep it simple...
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul><ul><ul><li>clean
parameterize
validate
load </li></ul></ul>
Keep URLs Clean Build trust by reducing clutter Before: http://example.com/news.xhtml?p=my-new-post After:  http://example...
Keep URLs Clean Real Life: Should have been: http://www.llbean.com/webapp/wcs/stores/servlet/CategoryDisplay?categoryId=28...
Keep URLs Clean Why don't more people buy used cars?
Keep URLs Clean They don't trust the last owner. They're afraid of getting a bad deal.
Keep URLs Clean <ul><li>Trust me?
Trust me. </li></ul>http:// www.linkedin.com/in/lincolnthree http://ocpsoft.com/prettyfaces http://sourceforge.net/project...
Keep URLs Clean <ul><li>Clean, readable URLs: </li><ul><li>Build trust
Are self-promoting, benefit SEO
Reduce vulnerability
Root the user </li></ul></ul>
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul><ul><ul><li>clean
parameterize
validate
load </li></ul></ul>
Parameterization (p14n) / root / the / user <ul><ul><li>Be consistent... always
Be general, progress to specific
Keep the query string optional </li></ul></ul>
Parameterization (p14n) <ul><li>P14N is: </li><ul><li>a “Scope”
where I am & what I'm looking at
user accessible </li></ul></ul>
Parameterization (p14n) Examples: <ul><li>No! </li></ul>http://scrumshark.com/project/PrettyFaces http://scrumshark.com/pr...
Problem solved <pretty-config> ... <url-mapping id=”viewProject”> <pattern> / project / #{currentProjectBean.project} </pa...
SiteMap <ul><li>PrettyFaces </li><ul><li>background
basics
navigation
SEO
examples </li></ul></ul><ul><ul><li>clean
parameterize
validate
load </li></ul></ul>
Validation <ul><li>P14n is a “Scope”
End-users have  DIRECT ACCESS
Validate everything </li></ul>
Validation @FacesValidator(“ projectName ”) public class ProjectNameValidator { public void validate(...) } <url-mapping i...
Validation Yes – pretty:id or empty PrettyFaces Validation Send 404 Is onError handler  defined? Handler returned Successf...
SiteMap <ul><li>PrettyFaces </li><ul><li>background
Upcoming SlideShare
Loading in...5
×

PrettyFaces: SEO, Dynamic, Parameters, Bookmarks, Navigation for JSF / JSF2 (UrlRewrite)

10,432

Published on

PrettyFaces: SEO, Dynamic Parameters, Bookmarks, and Navigation for JSF / JSF2 - As presented at JSFSummit2009 in Orlando Florida.

Why should we use PrettyFaces?

Published in: Technology, Design
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total Views
10,432
On Slideshare
0
From Embeds
0
Number of Embeds
39
Actions
Shares
0
Downloads
136
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide
  • Thank everyone for attending Tell them who you are Tell them where you are from and some of your hobbies
  • Went to Northfield Mount Hermon, and Penn State I want to start my own company Went through a few ideas with friends, landed on scrumshark I&apos;m talking about this because... scrumshark started prettyfaces
  • Client Facing Applications You&apos;ve got a stunning user interface, but your URLs are ugly... put in the extra effort
  • Transcript of "PrettyFaces: SEO, Dynamic, Parameters, Bookmarks, Navigation for JSF / JSF2 (UrlRewrite)"

    1. 1. PrettyFaces Client-facing JSF – Lincoln Baxter, III
    2. 2. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    3. 3. basics
    4. 4. navigation
    5. 5. SEO
    6. 6. examples </li></ul></ul>
    7. 7. PrettyFaces is: Url Rewriting http://example.com/faces/store .jsf http://example.com/ store
    8. 8. PrettyFaces is: Url Parameterization http://example.com/store/item/ Z34SD498
    9. 9. PrettyFaces is: Declarative Data Loading <action> #{storeBean.loadItem} </action>
    10. 10. PrettyFaces is: Simplified Navigation “ viewStore ” -> http://example.com/store
    11. 11. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    12. 12. basics
    13. 13. navigation
    14. 14. SEO
    15. 15. examples </li></ul></ul>
    16. 16. The PrettyFaces Story Lincoln Baxter, III PrettyFaces/PrettyTime Founder of O cpSoft
    17. 17. The PrettyFaces Story Lincoln Baxter, III Founder of O cpSoft @lincolnthree http://ocpsoft.com http://scrumshark.com http://ocpsoft.com/prettyfaces http://ocpsoft.com/prettytime
    18. 18. The Problem <ul><li>JSF1.x </li><ul><li>Good separation between M & V of MVC
    19. 19. Had usability issues, pitfalls
    20. 20. Navigation was a pain...
    21. 21. No bookmarks? Not entirely true.
    22. 22. What about Pretty URLs / SEO? </li></ul></ul>
    23. 23. The Result <ul><li>Took a while </li><ul><li>Tried a few other tools
    24. 24. Applied the 80/20 rule
    25. 25. Destroyed Thanksgiving 2008 </li></ul></ul>
    26. 26. The Result <ul><li>Came out with a Gem: PrettyFaces </li><ul><li>URLs were clean, search optimized
    27. 27. Faces-config practically gone
    28. 28. Data loading easy & declarative </li></ul></ul>Easy, Bookmarkable JSF
    29. 29. :) Life is good
    30. 30. Why do we need Pretty URLs? <ul><li>Build Trust
    31. 31. Enhance User Experience
    32. 32. Self-Promote </li></ul>
    33. 33. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    34. 34. basics
    35. 35. navigation
    36. 36. SEO
    37. 37. examples </li></ul></ul>
    38. 38. Rethinking Navigation The Basics Keep it simple...
    39. 39. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    40. 40. basics
    41. 41. navigation
    42. 42. SEO
    43. 43. examples </li></ul></ul><ul><ul><li>clean
    44. 44. parameterize
    45. 45. validate
    46. 46. load </li></ul></ul>
    47. 47. Keep URLs Clean Build trust by reducing clutter Before: http://example.com/news.xhtml?p=my-new-post After: http://example.com/news/my-new-post/
    48. 48. Keep URLs Clean Real Life: Should have been: http://www.llbean.com/webapp/wcs/stores/servlet/CategoryDisplay?categoryId=28&storeId=1&catalogId=1&langId=-1&nav=hp-gndp http://llbean.com/kids http://www.llbean.com/webapp/wcs/stores/servlet/CategoryDisplay? categoryId=28 & storeId=1 & catalogId=1 & langId=-1 & nav=hp-gndp Vulnerable!
    49. 49. Keep URLs Clean Why don't more people buy used cars?
    50. 50. Keep URLs Clean They don't trust the last owner. They're afraid of getting a bad deal.
    51. 51. Keep URLs Clean <ul><li>Trust me?
    52. 52. Trust me. </li></ul>http:// www.linkedin.com/in/lincolnthree http://ocpsoft.com/prettyfaces http://sourceforge.net/projects/resteasy/ http://www.youtube.com/watch?v=ZOU8GIRUd_g
    53. 53. Keep URLs Clean <ul><li>Clean, readable URLs: </li><ul><li>Build trust
    54. 54. Are self-promoting, benefit SEO
    55. 55. Reduce vulnerability
    56. 56. Root the user </li></ul></ul>
    57. 57. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    58. 58. basics
    59. 59. navigation
    60. 60. SEO
    61. 61. examples </li></ul></ul><ul><ul><li>clean
    62. 62. parameterize
    63. 63. validate
    64. 64. load </li></ul></ul>
    65. 65. Parameterization (p14n) / root / the / user <ul><ul><li>Be consistent... always
    66. 66. Be general, progress to specific
    67. 67. Keep the query string optional </li></ul></ul>
    68. 68. Parameterization (p14n) <ul><li>P14N is: </li><ul><li>a “Scope”
    69. 69. where I am & what I'm looking at
    70. 70. user accessible </li></ul></ul>
    71. 71. Parameterization (p14n) Examples: <ul><li>No! </li></ul>http://scrumshark.com/project/PrettyFaces http://scrumshark.com/project/PrettyFaces /s7 http://scrumshark.com/project/PrettyFaces /iterations http://scrumshark.com/project/PrettyFaces /iterations/Sprint1 http://scrumshark.com/PrettyFaces/Sprint1/iterations/project
    72. 72. Problem solved <pretty-config> ... <url-mapping id=”viewProject”> <pattern> / project / #{currentProjectBean.project} </pattern> <view-id>/faces/project/view.xhtml</view-id> </url-mapping> … </pretty-config> PrettyFaces
    73. 73. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    74. 74. basics
    75. 75. navigation
    76. 76. SEO
    77. 77. examples </li></ul></ul><ul><ul><li>clean
    78. 78. parameterize
    79. 79. validate
    80. 80. load </li></ul></ul>
    81. 81. Validation <ul><li>P14n is a “Scope”
    82. 82. End-users have DIRECT ACCESS
    83. 83. Validate everything </li></ul>
    84. 84. Validation @FacesValidator(“ projectName ”) public class ProjectNameValidator { public void validate(...) } <url-mapping id=”viewProject”> <pattern value=”/project/#{currentProjectBean.project}”> <validate param=&quot;0&quot; validatorIds=” projectName ... ” /> </pattern> <view-id>/faces/project/view.xhtml</view-id> </url-mapping> pretty-config.xml
    85. 85. Validation Yes – pretty:id or empty PrettyFaces Validation Send 404 Is onError handler defined? Handler returned Successfully? Inject values & continue or redirect to “pretty:id” Throw Exception
    86. 86. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    87. 87. basics
    88. 88. navigation
    89. 89. SEO
    90. 90. examples </li></ul></ul><ul><ul><li>clean
    91. 91. parameterize
    92. 92. validate
    93. 93. load </li></ul></ul>
    94. 94. Data Loading A few ways to do it: <ul><ul><li>Always Load (On construction)
    95. 95. Lazy Loading (On access)
    96. 96. Declarative Loading (On event) </li></ul></ul>
    97. 97. Data Loading <ul><li>Declarative Loading </li><ul><li>JSF1.x traditionally sticky with this
    98. 98. Enables deterministic behavior
    99. 99. JSF2 helps a lot </li><ul><li>More on that later </li></ul></ul></ul>
    100. 100. Nothing fancy <pretty-config> ... <url-mapping id=”viewProject”> <pattern> /project/#{currentProjectBean.project} </pattern> <view-id>/faces/project/view.xhtml</view-id> <action> #{currentProjectBean.load} </action> </url-mapping> … </pretty-config> PrettyFaces
    101. 101. Action Methods RESTORE_VIEW APPLY_REQUEST_VALUES PROCESS_VALIDATION … ANY_PHASE CurrentProjectBean + load() PrettyFaces Action Invocation <action>#{currentProjectBean.load}</action> Trigger Navigation Continue Lifecycle
    102. 102. Alternatives More Configuration +3 +8 +1+n +4 Lines: = ~4 :) PrettyFaces = ~17! 2.0 view params Url Rewrite Filter 2.0 event listeners 1.x: requires seam or other pretty-config.xml
    103. 103. The Basics <ul><li>Keep URLs clean – Build trust, self promote
    104. 104. Logical Parameter Order – Root the User
    105. 105. Validate everything
    106. 106. Load data declaratively </li></ul>
    107. 107. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    108. 108. basics
    109. 109. navigation
    110. 110. SEO
    111. 111. examples </li></ul></ul><ul><ul><li>clean
    112. 112. parameterize
    113. 113. validate
    114. 114. load </li></ul></ul>
    115. 115. Rethinking Navigation Rethinking Navigation so many channels, so little time...
    116. 116. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    117. 117. basics
    118. 118. navigation
    119. 119. SEO
    120. 120. examples </li></ul></ul><ul><ul><li>history
    121. 121. mappingId
    122. 122. de-coupling
    123. 123. GET </li></ul></ul>
    124. 124. History: the old <h:commandLink action=”viewProject” /> <navigation-rule> <from-view-id> * </from-view-id> <navigation-case> <from-action> * </from-action> <from-outcome>viewProject</from-outcome> <to-view-id>/faces/project/view.xhtml</to-view-id> </navigation-case> </navigation-rule>
    125. 125. History: the new <h:link outcome=”/view”> <f:param name=”project” value=”prettyfaces”/> </h:link> <f:metadata> <f:viewParam name=”project” value=”...” /> </f:metadata>
    126. 126. History: Navigation Cases <ul><li>Complex logic can be pulled into XML
    127. 127. Conditional evaluation and outcomes
    128. 128. Selectively pass page-params </li><ul><li>… sounds like code? </li></ul></ul>
    129. 129. How often do we need them? pretty:hospital “ The baby's coming!” “ It might be a late night, Should we get some coffee?” No... “ What if we don't remember This? Let's get a video Camera!” NO! “ Should I pick up my mother?” DRIVE!!
    130. 130. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    131. 131. basics
    132. 132. navigation
    133. 133. SEO
    134. 134. examples </li></ul></ul><ul><ul><li>history
    135. 135. mappingId
    136. 136. de-coupling
    137. 137. GET </li></ul></ul>
    138. 138. pretty:mappingId private String actionMethod() { if(user.isMember) { return “ pretty:viewProject ”; } return “ pretty:joinProject ”; } < p:link mappingId=” hospital ”> <f:param value=”delivery”/> < /p:link >
    139. 139. That Same Configuration The mapping ID <pretty-config> ... <url-mapping id=” viewProject ”> <pattern> /project/ #{currentProjectBean.project} </pattern> <view-id>/faces/project/view.xhtml</view-id> <action> #{currentProjectBean.load} </action> </url-mapping> … </pretty-config> PrettyFaces
    140. 140. P14N is a “Scope” “ P14N is a Scope” private String createProject() { if(dao.createProject(project)) { currentProjectBean.setProject( “scrumshark” ); return “pretty:viewProject”; } FacesUtils.addError(“Something went wrong! Try again.”); return null; } project.getName()
    141. 141. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    142. 142. basics
    143. 143. navigation
    144. 144. SEO
    145. 145. examples </li></ul></ul><ul><ul><li>history
    146. 146. mappingId
    147. 147. de-coupling
    148. 148. GET </li></ul></ul>
    149. 149. But what about coupling? <ul><li>PrettyFaces - Coupling pretty:ids to action methods
    150. 150. JSF2 - Coupling view locations to action methods </li></ul>(what happens when you need to refactor?) Take your pick...
    151. 151. But what about coupling? JSF2 /WebContent /faces /project view.xhtml Action Methods <h:link> <h:commandLink> faces-config.xml
    152. 152. But what about coupling? PrettyFaces /WebContent /faces /project view.xhtml Action Methods <p:link> <h:commandLink> faces-config.xml pretty:viewProject
    153. 153. But what about coupling? <ul><li>PrettyFaces – pretty:ids abstract resource locations, lowers maintenance cost.
    154. 154. “You GET what you ask for” </li></ul>
    155. 155. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    156. 156. basics
    157. 157. navigation
    158. 158. SEO
    159. 159. examples </li></ul></ul><ul><ul><li>history
    160. 160. mappingId
    161. 161. de-coupling
    162. 162. GET </li></ul></ul>
    163. 163. “You GET what you ask for” GET /project/scrumshark Create Project Action #{bean.create} GET /newproject Invoke Navigation “pretty:viewProject” <action> Load Project Data Render Response ?
    164. 164. “You GET what you ask for” Option to handle behavior up front, instead of “behind” a submit. GET /project/scrumshark <action> Load Project Data ?
    165. 165. Can I still use JSF navigation? <ul>Yes – PrettyFaces extends, does not interfere with, JSF navigation. </ul>
    166. 166. In summary <ul><li>PrettyFaces offers: </li><ul><li>Declarative navigation via GET
    167. 167. Encapsulation, de-coupling from view-location
    168. 168. Extension to existing JSF navigation </li></ul></ul>
    169. 169. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    170. 170. basics
    171. 171. navigation
    172. 172. SEO
    173. 173. examples </li></ul></ul><ul><ul><li>history
    174. 174. mappingId
    175. 175. de-coupling
    176. 176. GET </li></ul></ul>
    177. 177. Search Engine Optimization
    178. 178. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    179. 179. basics
    180. 180. navigation
    181. 181. SEO
    182. 182. examples </li></ul></ul><ul><ul><li>keywords
    183. 183. basics
    184. 184. change </li></ul></ul>
    185. 185. Keywords <ul><li>PUT KEYWORDS IN THE URL </li></ul>#1 Self-promoting Links
    186. 186. Keywords examples Poor: http://example.com/shop.jsf?catId=23&itemId=Z34FK94SE Partly there: http://example.com/shop.jsf?cat=books&item=how-to-start-a-web-store Perfect: http://example.com/shop/books?item=how-to-start-a-web-store Self-promoting Links
    187. 187. Keywords examples <url-mapping id=&quot;viewItem&quot;> <pattern> /shop/#{catBean.item} </pattern> <query-param name=” item ”> {itemBean.itemName} </query-param> <view-id>/faces/shop.jsf</view-id> <action> #{itemBean.load} </action> </url-mapping>
    188. 188. Why do we need Pretty URLs? <ul><li>Build Trust, Transparency
    189. 189. Enhance User Experience
    190. 190. Self-Promote, SEO </li></ul>
    191. 191. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    192. 192. basics
    193. 193. navigation
    194. 194. SEO
    195. 195. examples </li></ul></ul><ul><ul><li>keywords
    196. 196. basics
    197. 197. change </li></ul></ul>
    198. 198. SEO is all you need False
    199. 199. Install Google Analytics http://ocpsoft.com July 2008: 0 Nov 2009: 13,287 views 68% from search
    200. 200. Three Fundamentals <ul><li>Actually provide information
    201. 201. Get people to say they believe you
    202. 202. Get search engines to believe you both </li></ul>
    203. 203. That means... <ul><li>Content: </li></ul>Choose your keywords, make sure they are appropriate for your content.
    204. 204. That means... <ul><li>Credibility: </li></ul>Get other people to link back to your site, or create those links yourself.
    205. 205. That means... <ul><li>Context:
    206. 206. Make sure your external links appear on pages relevant to your content. </li></ul>
    207. 207. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    208. 208. basics
    209. 209. navigation
    210. 210. SEO
    211. 211. examples </li></ul></ul><ul><ul><li>keywords
    212. 212. basics
    213. 213. change </li></ul></ul>
    214. 214. Plan for Change .jsf .jsp .php .do .cgi .asp
    215. 215. Clean up your URLs Technology changes... be agnostic. /
    216. 216. SiteMap <ul><li>PrettyFaces </li><ul><li>background
    217. 217. basics
    218. 218. navigation
    219. 219. SEO
    220. 220. examples </li></ul></ul><ul><ul><li>keywords
    221. 221. basics
    222. 222. change </li></ul></ul>
    223. 223. Examples what a “view”
    224. 224. Setup Add Pretty Filter in web.xml <filter> <filter-name>Pretty Filter</filter-name> <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class> </filter> <filter-mapping> <filter-name>Pretty Filter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>
    225. 225. Map your first pages Create /WEB-INF/pretty-config.xml <pretty-config xmlns=&quot;http://ocpsoft.com/prettyfaces-xsd&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ocpsoft.com/prettyfaces-xsd http://ocpsoft.com/xml/ns/prettyfaces/pretty-1.0.xsd&quot; > <url-mapping id=&quot;home&quot;> <pattern> /home </pattern> <view-id> /faces/home.jsf </view-id> </url-mapping> <url-mapping id=&quot;viewComment&quot;> <pattern value=”/story/#{myBean.currentStoryId}/#{myBean.commentId}” /> <view-id>/faces/story/comment.jsf</view-id> </url-mapping> </pretty-config>
    226. 226. Add some actions Take action ;) <pretty-config xmlns=&quot;http://ocpsoft.com/prettyfaces-xsd&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ocpsoft.com/prettyfaces-xsd http://ocpsoft.com/xml/ns/prettyfaces/pretty-1.0.xsd&quot; > <url-mapping id=&quot;home&quot;> <pattern> /home </pattern> <view-id> /faces/home.jsf </view-id> <action> #{homeBean.loadUserLayout} </action> </url-mapping> <url-mapping id=&quot;viewComment&quot;> <pattern value=”/story/#{myBean.currentStoryId}/#{myBean.commentId}” /> <view-id>/faces/story/comment.jsf</view-id> <action> #{myBean.load} </action> </url-mapping> </pretty-config>
    227. 227. Validate (2.0.x series only) <pretty-config xmlns=&quot;http://ocpsoft.com/prettyfaces-xsd&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ocpsoft.com/prettyfaces-xsd http://ocpsoft.com/xml/ns/prettyfaces/pretty-1.0.xsd&quot; > <url-mapping id=&quot;home&quot;> <pattern> /home </pattern> <view-id> /faces/home.jsf </view-id> <action> #{homeBean.loadUserLayout} </action> </url-mapping> <url-mapping id=&quot;viewComment&quot;> <pattern value=”/story/#{myBean.currentStoryId}/#{myBean.commentId}”> <validate param=”0” validatorIds=”integerValidator” /> <validate param=”1” validatorIds=”integerValidator” /> </pattern> <view-id>/faces/story/comment.jsf</view-id> <action>#{myBean.load}</action> </url-mapping> </pretty-config>
    228. 228. Navigate viewComment.xhtml <%@ taglib prefix=&quot;pretty&quot; uri=&quot;http://ocpsoft.com/prettyfaces&quot; %>   <pretty:link mappingId=&quot;comment&quot;> <f:param value=&quot;23&quot; /> <f:param value=&quot;5&quot; /> Go to Comment. (This is Link Text) </pretty:link>   <pretty:link mappingId=&quot;comment&quot;> <f:param value=&quot;#{myBean.storyId}&quot; /> <f:param value=&quot;#{myBean.nextCommentId}&quot; /> View next comment. (This is Link Text) </pretty:link>
    229. 229. The SiteMap If this presentation were a website... <pretty-config xmlns=&quot;http://ocpsoft.com/prettyfaces-xsd&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ocpsoft.com/prettyfaces-xsd http://ocpsoft.com/xml/ns/prettyfaces/pretty-1.0.xsd&quot; > <url-mapping id=&quot;home&quot;> <pattern> /prettyfaces </pattern> <view-id> /faces/home.jsf </view-id> </url-mapping> <url-mapping id=&quot;levelOne&quot;> <pattern> /prettyfaces/#{presBean.levelOne} </pattern> <view-id> /faces/present.jsf </view-id> </url-mapping> <url-mapping id=&quot;levelTwo&quot;> <pattern> /prettyfaces/#{presBean.levelOne}/#{presBean.levelTwo} </pattern> <view-id> /faces/present.jsf </view-id> </url-mapping> </pretty-config>
    230. 230. Questions? Lincoln Baxter, III Founder of O cpSoft @lincolnthree http://ocpsoft.com http://scrumshark.com http://ocpsoft.com/prettyfaces http://ocpsoft.com/prettytime
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×