Re: conditional url-mapping

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


I agree with Lincoln! Just merge the two mappings into one. This should work fine:

<url-mapping id="productsGroupAndProducer" parentId="products">
<pattern value="#{ /[01]/ order }/#{ value }/"/>
<view-id value="/products.html"/>

This will capture requests like:


You could then add an action method to the mapping and do whatever you want with the two parameters (order and value). If order is 1 the value will contain a group name and the other way around.