Reply To: Search Filter Dynamic Url

Splash Forums PrettyFaces Users Search Filter Dynamic Url Reply To: Search Filter Dynamic Url

#25601

ravindra
Participant

Please ignore my previous error log. Below is the code.

.addRule().when(Direction.isInbound().and(Path.matches("/p/search/{filters}"))).perform(Forward.to("/pages/search.xhtml")).where("filters").matches(".*");

My Request URL is /p/search/cat-12/mode-1 and I got cat-12/mode-1 through {filters}. Now I need to split {filters} and pass them to /pages/search.xhtml as cat=12&mode=1.

Is there any way where I can access the {filters} value and pass it to a method to split them as desired and pass them back to /pages/search.xhtml?

Something like .to("/pages/trainingSearch.xhtml?"+getQueryString("{filters}") where getQueryString is a static method in custom class PrettyConfigurationProvider which extends HttpConfigurationProvider.

  • This reply was modified 8 years, 1 month ago by  ravindra.
  • This reply was modified 8 years, 1 month ago by  Lincoln Baxter III.