Reply To: Get view-id from arbitrary pretty-url

Splash Forums Rewrite Users Get view-id from arbitrary pretty-url Reply To: Get view-id from arbitrary pretty-url

#24728

djmj
Participant

Oh I thought it was clear since we are in RewriteUsers. I should have used “clean-url” instead of “pretty-url” not to confuse anyone.

Much thanks and your answer looks interesting, but…

About Session scoped navigation history

But i already had something like a history NavigationHandler and I do not want to store this info in the session.
First the windowId is necessary to make it work perfectly (what happens if user opens multiple windows/tabs?) since session-scope is to wide, and not using jsf 2.2 at the moment I have no access to windowId.

Furthermore lets keep it as stateless as possible by appending the last url as a query-param.

Somewhere in the deep code of rewrite there must be a method that takes a mapped “clean-url” and generates depending on the rules and patterns in the config the desired internal “view-id/url”.

I have two options:

  • I: Use this method I am not aware of right now.
  • II: Simply use plain html anchor (which could have other drawbacks, but for my case it is sufficient)