[solved] Convert between named path-parameters and query-parameters

Splash Forums PrettyFaces Users [solved] Convert between named path-parameters and query-parameters

This topic contains 2 replies, has 2 voices, and was last updated by  Lincoln Baxter III 7 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17760

    panayk
    Participant

    Hi! Is it possible to convert between named path-parameters and query-parameters?

    Like this:

    /item/show.faces?id=1

    should be mapped to

    /item/show/1

    Many thanks in advance

    #20036

    panayk
    Participant

    Never mind. A silly question.

    This does what I want:

    <url-mapping id=”showItem”>

    <pattern value=”/item/show/#{id : showItemController.itemId}” />

    <view-id>/item/show.faces</view-id>

    </url-mapping>

    #20037

    :)

    You can also use just a name if you don’t want injection:

    <url-mapping id="showItem">
    <pattern value="/item/show/#{id}" />
    <view-id>/item/show.faces</view-id>
    </url-mapping>

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

You must be logged in to reply to this topic.

Comments are closed.