Reply To: Intercept request

Splash Forums PrettyFaces Users Intercept request Reply To: Intercept request

#24814

Did you think about using mapping inheritance for this? Have a look at this part of the documentation:

http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.mapping.parents

Basically it allows to do something like this:

<url-mapping id="base">
  <pattern value="/#{ store }/#{ language }" />
  <view-id value="/pages/unsecure/something.xhtml" />
  <action>#{someBean.doSomeCommonStuff}</action>
</url-mapping>

<url-mapping id="search" parentId="base">
  <pattern value="/search/#{ searchtext }" />
  <view-id value="/pages/unsecure/search/searchresult.xhtml" />
  <action>#{solrJsfFacade.findItemSearchBeans(searchtext)}</action>
</url-mapping>

This way all the common stuff is done in the “base” mapping and all sub-pages inherit from this mapping.