Navigation Issue

Splash Forums PrettyFaces Users Navigation Issue

This topic contains 5 replies, has 3 voices, and was last updated by  Lincoln Baxter III 4 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #17960


    I am encountering a navigation issue after using pretty faces. There is an edit page where i have a link for Home with below code

    <a href="Home">Home</a>

    The edit page url is


    When i click the Home link on this page, the url changes to


    but the page never navigates to home page.

    I am using Glassfish with JSF 2.0


    <url-mapping id=”Home”>

    <pattern value=”/Home” />



    <url-mapping id=”Edit_Case_Definition”>

    <pattern value=”/Case_Definition_Edit/#{caseDefinition.caseDefID }” />



    Let me know if you have any ideas.


    You are using a standard HTML link with an relative URL. You should either make your URL absolute using something like this:

    <a href="#{request.contextPath}/Home">Home</a>

    Or you could use the pretty:link component for this:

    <pretty:link mappingId="Home">Home</pretty:link>

    I hope this helps.. :)



    Thanks Chris.

    Does Pretty faces have a pretty button or something like pretty:link ?


    No, there is no button component in PrettyFaces. But if you want a button you could do something like this:

    <h:commandButton action="pretty:home" .... />

    But clicking this button will create a postback to the old view followed by a redirect to the new page. So this will lead to two requests instead of only one.


    The issue with buttons is that it takes manuscript to make them work unless you render a special form. Prettyfaces gives you a way to do hissing <pretty:urlbuffer var="url" mappingId="pretty:home">, which then stores the url into the #{requestScope.url}




Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Comments are closed.