Startup with PrettyFaces

Splash Forums PrettyFaces Users Startup with PrettyFaces

This topic contains 5 replies, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 10 months ago.

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

    maargot81
    Participant

    Hello everyone!

    I’m trying to use PrettyFaces into my jsf 2.2 web app.
    I configured PrettyFaces and it works but I’m not sure for the url configuration.

    Example: simple navigation from homepage to registration page using h:link

    pretty-config.xml

    
    <url-mapping id="goRegistrazionePretty">
        <pattern value="/registrazioneUtente" />
        <view-id value="/pages/homepage/registrazioneUtente.jsf" />
    </url-mapping>
    

    homepage.xhtml

    
    ......
    <p:column rendered="#{!beanUtente.logged}">
        <p:outputLabel value="#{ApplResLbl.registrazioneLabel} "/>
        <h:link outcome="pretty:goRegistrazionePretty" value="#{ApplResLbl.registrazioneLink}" styleClass="gialloFont" title="#{ApplResLbl.registrazioneAlt}" />
    </p:column>
    ......
    

    When I navigate by h:link I can see this strange url

    
    http://localhost:8080/EventiCinofiliWEB/registrazioneUtente?jffi=%2Fpages%2Fhomepage%2FregistrazioneUtente.jsf%3Fcom.ocpsoft.mappingId%3DgoRegistrazionePretty&jftfdi=
    

    instead of the simple url like this

    
    http://localhost:8080/EventiCinofiliWEB/registrazioneUtente
    

    So…how can I obtain a clear url without jffi and jftfdi id?

    Thanks in advance for any suggestions!

    Vale

    #24858

    Could you try this instead:

    <h:link outcome="/pages/homepage/registrazioneUtente.xhtml" value="click me" />

    Which version of PrettyFaces are you using?

    #24859

    maargot81
    Participant

    Hello Christian and thanks for your answer!
    I’m using prettyfaces-jsf2-3.3.3.jar for my web app.

    With

    
    <h:link outcome="/pages/homepage/registrazioneUtente.xhtml" value="click me" />
    

    I’ve this new url:

    
    http://localhost:8080/EventiCinofiliWEB/registrazioneUtente?jffi=%2Fpages%2Fhomepage%2FregistrazioneUtente.xhtml&jftfdi=
    

    I can’t remove jffi and jftfdi from my query string….why?

    #24860

    Weird. Could you try if the solution mentioned here works:

    http://ocpsoft.org/support/topic/problem-with-link-generation-with-language-parameter/#post-24474

    Are you using any additional component libraries or something like this?

    #24861

    maargot81
    Participant

    Yes, I’m using primefaces-3.5.jar also!

    #24973

    It’s really difficult to help you with this problem without a sample app that show this issue and allows us to do some debugging.

    Could you perhaps create a minimal sample app that reproduces this issue? You could use the Prettyfaces Maven Archetype I created some time ago:

    https://github.com/chkal/prettyfaces-archetypes/wiki

    With this archetype you will get a minimal webapp with PrettyFaces already set up. With this it should be easy for you to add the corresponding code to reproduce this issue.

    BTW: The archetype is a bit old. So you will have to update the PrettyFaces version in the pom to 3.3.3 after the app was created.

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

You must be logged in to reply to this topic.

Comments are closed.