Rewrite outgoing parameters from bean

Splash Forums PrettyFaces Users Rewrite outgoing parameters from bean

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18182

    m2m
    Participant

    My i18n url rule is working perfectly for incoming requests (ie /en/index.html)

    <url-mapping id=”lang”>

    <pattern value=”/#{locale.language}”/>

    </url-mapping>

    <url-mapping id=”home” parentId=”lang”>

    <pattern value=”/index.html”/>

    <view-id value=”/index.xhtml”/>

    </url-mapping>

    But I would like to have the url rewritten on outgoing requests as well, without having to manually specify a parameter for every navigation in my application. Is it possible to configure this rule so that the bean locale.language is called on outgoing requests?

    For example:

    <h:link value=”Home” outcome=”pretty:home”/>

    Instead of:

    <h:link value=”Home” outcome=”pretty:home”>

    <f:param name=”lang” value=”#{locale.language}”/>

    </h:link>

    #22185

    As far as I know, you should be able to omit the <f:param> and this should already work because you’ve used a Bean EL expression in the pattern of your “lang” mapping. Is this not working?

    #22186

    m2m
    Participant

    Nope. Do you need more information? I’m new to this

    #22187

    Yeah, Could you attach your project (or a sample that reproduces the problem) to this thread? You can use the file-upload below.

    It’s possible you found a bug, and it would be good to know this before releasing 3.3.3 today.

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

You must be logged in to reply to this topic.

Comments are closed.