Re: conditional url-mapping

Splash Forums PrettyFaces Users conditional url-mapping Re: conditional url-mapping

#21408

m1m
Participant

Thanks, but this mapping dosen’t apply to my case since I want also value of #{order} param. I came up with this:

<url-mapping id="productsGroup" parentId="products">
<pattern value="#{/1/order}/#{group}/"/>
<view-id value="/products.html"/>
</url-mapping>

<url-mapping id="productsProducer" parentId="products">
<pattern value="#{/0/order}/#{producer}/"/>
<view-id value="/products.html"/>
</url-mapping>

It works, but the following mapping is not (always choose the first one):

<url-mapping id="productsGroupAndProducer" parentId="products">
<pattern value="#{/1/order}/#{group}/#{producer}/"/>
<view-id value="/products.html"/>
</url-mapping>

<url-mapping id="productsProducerAndGroup" parentId="products">
<pattern value="#{/0/order}/#{producer}/#{group}/"/>
<view-id value="/products.html"/>
</url-mapping>

But it’s not problem anymore, I’ll use explicitly pretty:mappingId in my outcome