Prettyfaces action does not work with path parameters

Splash Forums PrettyFaces Users Prettyfaces action does not work with path parameters

This topic contains 0 replies, has 1 voice, and was last updated by  Vlapr 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27655

    Vlapr
    Participant

    I have asked question here: question

    I use prettyfaces with primefaces.

    The mapping /report1, /report2 and /report3 works as expected without problem (calls the appropriate method, set url parameters, displays appropriate page.

    /report4 and /report5 displays “not found”, no method or setter is called and nothing happen.

    a. When I remove the parameter part it works
    b. When I add view-id then it works partially (method/setter is called but wrong page is displayed because is overwritten with the view-id)

    WHY /report4 does not work same way as the /report1 ?????
    WHAT is wrong?
    HOW to solve it?

    The pretty-config.xml is:

    <url-mapping id=”report1″>
    <pattern value=”/report1″ />
    <action>#{navController.setTarget(‘/report/content/contentPdf.xhtml’, ‘1’)}</action>
    </url-mapping>

    <url-mapping id=”report2″>
    <pattern value=”/report2/#{ username }” />
    <view-id value=”/report/content/welcome.xhtml” />
    </url-mapping>

    <url-mapping id=”report3″>
    <pattern value=”/report3/#{ id: navController.id }” />
    <view-id value=”/report/content/welcome.xhtml” />
    </url-mapping>

    <url-mapping id=”report4″>
    <pattern value=”/report4/#{ username }” />
    <action>#{navController.setPage(‘/report/content/contentPdf.xhtml’)}</action>
    </url-mapping>

    <url-mapping id=”report5″>
    <pattern value=”/report5/#{ id: navController.id }” />
    <action>#{navController.setPage(‘/report/content/contentPdf.xhtml’)}</action>
    </url-mapping>
    Dependency at pom.xml are:

    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-servlet</artifactId>
    <version>3.4.1.Final</version>
    </dependency>

    <dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-config-prettyfaces</artifactId>
    <version>3.4.1.Final</version>
    </dependency>

    <dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>6.0</version>
    </dependency>

    • This topic was modified 4 weeks, 1 day ago by  Vlapr.
    • This topic was modified 4 weeks, 1 day ago by  Vlapr.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.