Re: conditional url-mapping

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

#21412

m1m
Participant

Now I have following mappings

<url-mapping id="products">
<pattern value="/products/"/>
<view-id value="/products.html"/>
</url-mapping>
<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>
<url-mapping id="productsGroupAndProducer" parentId="productsGroup">
<pattern value="#{producer}/"/>
<view-id value="/products.html"/>
</url-mapping>
<url-mapping id="productsProducerAndGroup" parentId="productsProducer">
<pattern value="#{group}/"/>
<view-id value="/products.html"/>
</url-mapping>

And it work’s, but when using two last mappings I must use pretty:productsGroupAndProducer or pretty:productsProducerAndGroup in h:link.

If I use /products in h:link it always get mapped to productsGroupAndProducer.