Re: multi-language url rewiting. Is it possible?

Splash Forums PrettyFaces Users multi-language url rewiting. Is it possible? Re: multi-language url rewiting. Is it possible?

#23432

francescanye
Member

I played with both h:link and pretty:link,

the beaviour is quite different:

1. <h:link>

I tried two links of this type, the one suggested by Christian:

<h:link outcome="/pages/main/welcome.jsf">
info1
</h:link>

and the following one:

<h:link outcome="/pages/main/welcome.jsf" value="#{msgs.info}">
<f:param value="#{localeChanger.languageCode}" />
</h:link>

the results are the same: the url becomes http://localhost:8080/mtc/pages/main/welcome.jsf, so the out-bound seems to misbehave.

2. <h:link> with mapping-ID

<h:link outcome="pretty:welcome" value="#{msgs.info}">
<f:param value="#{localeChanger.languageCode}" />
</h:link>

here the url becomes http://localhost:8080/mtc/pages/main/welcome.jsf?com.ocpsoft.mappingId=welcome

…still not working

3. <pretty:link>

<pretty:link mappingId="welcome">
<f:param value="#{localeChanger.languageCode}" />
info2
</pretty:link>

here the url becomes http://localhost:8080/mtc/it/main/welcome, so the out-bound works as expected.

I used the configuration we discussed in the previous posts, why h:link doesn’t work as expected?

Thanks in advance