Re: Issue : pretty:link trailing '?'

Splash Forums PrettyFaces Users Issue : pretty:link trailing '?' Re: Issue : pretty:link trailing '?'

#22631

LaChamelle
Participant

Most of the time, in my url the two first param are the same, only the third change:

<url-mapping id="themes">
<pattern value="/themes/#{lang : prettyManager.urlLangId}/#{siteId : prettyManager.urlSiteId}" />
<view-id value="themes.jsf" />
<action onPostback="false">#{prettyManager.processThemeList}</action>
</url-mapping>

<url-mapping id="themeSettings">
<pattern value="/themeSettings/#{lang : prettyManager.urlLangId}/#{siteId : prettyManager.urlSiteId}/#{themeId : prettyManager.urlThemeId}" />
<view-id value="themeSettings.jsf" />
<action onPostback="false">#{prettyManager.processThemeSettings}</action>
</url-mapping>

But if the urlSiteId is null then PrettyFaces tell it cannot build the link.

I suppose that the pretty:link component add an ‘?’ cause I give him a extra null parameter, all the required param are defined.

<pretty:link mappingId="themes" rendered="#{prettyManager.currentMappingId ne 'emptyhome'}" styleClass="langue">
<f:param value="#{acceptedLanguage}"/>
<f:param value="#{prettyManager.urlSiteId}" />
<f:param value="#{prettyManager.aNullValue}" />
#{acceptedLanguage}
</pretty:link>