Reply To: @Join, @RequestAction and dispatch

Splash Forums Rewrite Users @Join, @RequestAction and dispatch Reply To: @Join, @RequestAction and dispatch


Thanks for sharing the code.

To be honest, I don’t have an idea why the annotation case isn’t working as expected. I don’t see any obvious error here. Perhaps the inheritance is causing problems? I’m not sure if having @Parameter and @RequestAction in an abstract base class will work without problems.

However, apart from these problems, if I were you, I would prefer using <f:viewParam> and <f:viewAction> over the Rewrite annotations. In my my experience it is preferable to use the features provided by core JSF instead of using too much of the fancy features of 3rd party libraries (including Rewrite). If you use the core JSF features to implement the parameter binding and the action method invocation, you could in theory even simply drop Rewrite from your project and it should still work fine (even if the URLs aren’t pretty any more after that).

Or is there any specific reason why you would like to use the annotations? You can BTW also use <f:viewParam> and <f:viewAction> and the Rewrite @View annotation. That will work fine.

However, if you want to find out why the annotations aren’t working in the dispatch case, you will have to dig deeper into the Rewrite code, which can be very difficult. I know this from personal experience 🙂