Reply To: RewriteRule to PrettyFaces.config

Splash Forums PrettyFaces Users RewriteRule to PrettyFaces.config Reply To: RewriteRule to PrettyFaces.config

#25297

mfe_
Participant

I got something more:

 <url-mapping id="viewIngredient">
        <pattern value="/ingredient/#{ /([a-zA-Z ]*\\.html)/ ingredient }" />
        <view-id value="/viewIngredient.jsf" />
    </url-mapping>

This regex works fine.
In my viewIngredient.jsf I have the following viewParameter

        <f:metadata>
            <f:viewParam name="ingredient" value="#{IngredientBean.ingredient}" converter="#{ingredientStringConverter}" required="true" maxlength="150"></f:viewParam>
        </f:metadata>

Whenever I call http://localhost:8080/wie-koche-ich/ingredient/SPAETZLE%20OHNE%20EI.html my viewParameter ingredient and the converter recives “SPAETZLE OHNE EI.html” as string. So I asked myself if there is a way to tell prettyfaces to assign the parameter without the “.html”?
In this example the viewParam ingredient should only contain the value “SPAETZLE OHNE EI”.

If this can be done with prettyfaces this would be really great!

Best regards

  • This reply was modified 8 years, 3 months ago by  mfe_.