java - Please recommend what navigation strategy to use for Spring MVC 3.0 -
I am launching a Spring MVC 3.0 application and starting to work well with controllers and ideas, one The thing that I now have to do is navigation is working so I have to know for each scene, to see what item is highlighted in the "menu" section and what menu options available for that view Are there.
One thing I had thought was to tell the controller to tell where it is, but it is compulsive visual logic in the controller. My thoughts are in the menu itself, in which I am involved in every scene.
What are your views? I am thinking of using tiles, at this point I am only using JSP and JSTL, maybe it will help?
I recommend you use tiles as a visual manager, and such One viewer interpreter:
& lt; Bean id = "viewNameTranslator" class = "org.springframework.web.servlet .view.DefaultRequestToViewNameTranslator" & gt; & Lt; Property name = "Separator" value = "." / & Gt; & Lt; / Bean & gt;
So in this way you can avoid specifying the visible names at zero to return to the controller class.
Later on tile-def.xml, you define a view like this:
& Lt; Put name = "body" value = "/ pages / newStuff / content.jsp" /> & Lt; / Definition & gt;
The menu.jsp receives a Highlight View parameter with the information you need. -
Hope it helps.
Comments
Post a Comment