I have a JSF 2.0 app where each page is stored in a cms_page table in the database. That table has the PK column cms_page_id and a URL column (which holds the SEO friendly URL).
When I display a page there is a link called About Us, which has the URL "/com/aboutus.html" This appears in my XHTML file as: #{cmsPage.cmsPageUrlName}/>
Which renders
<a href="/com/aboutus.html">About Us</a>
As far as I know h:outputLink cannot be used to fire any methods in the backing bean. I can't use h:commandLink, as this will not show the "/com/aboutus.html" URL when you hover over the link. I can't figure out how to fire a backing bean method to navigate to the next page. The about us link would really be going to /faces/pages.xhtml, but would use PrettyFaces to display the "/com/aboutus.html" URL
Also, what would I to if I went directly to the URL www.test.com/com/aboutus.html
?
This URL doesn't exist, the actual URL would be www.test.com/faces/pages.xhtml?url=%2Fcom%2Faboutus.html
Should I be looking at setting up PrettyFaces to do all the work instead?