While writing the URL mapping rules for Prettyfaces in pretty-config.xml
I would like to add a rule that whenever a particular pattern is observed in URL then set a
You should simply use a path parameter and convert the value from the URL to your constant in a page action method. Something like this:
#{bean.action}
And the action method:
public void action() {
if( "electronics".equals(this.category) ) {
this.category = "ELECTRONICS_ITEMS";
}
// more categories...
}