Jun 26th, 2009, 01:40 PM
ModelAndView null in interceptor
I use an interceptor to get certain menu items from a database depending on the role of the user (logged in users get other menu items than users that are not logged in). Unfortunately this does not work with SWF, because the MAV is always null when an interceptor is called after a request handled by SWF. Is there a way to solve this? This seems to be expected behavior, but I really don't understand why. Why can't SWF delegate the rendering of the view to MVC, and do nothing more than choosing a view and inserting some data into the model?
The only solution I can see right now is moving the menu functionality from an interceptor to a taglib, which is something that completely ruins the possibilty to switch to Velocity, Freemarker, or any other view technology that doesn't support taglibs later. So much for pluggability.
In case it matters:
Spring Web Flow 2.0.7
Thank you for your time,
Tags for this Thread