dynamic tiles2 definitions with spring 3
Hi all,
Am doing some work in Spring 3, together with tiles2. I am using the MVC, and am kind of stuck. I have a method in a controller, defined as :
@RequestMapping("/content/stories/view/{storyid}")
public ModelAndView editStoryPage(HttpServletRequest request, @PathVariable("storyid") int storyid) {
...
}
In my tiles xml definition, how do i dynamically map the {storyid} to a definition: the following is not working
<definition name="content/stories/**" extends="classic.definition">
<put-attribute name="title" value="View story" />
<put-attribute name="body" value="/WEB-INF/jsp/content/stories/viewstory.jsp" />
</definition>
So in short, if execute something like:
localhost/content/stories/1
localhost/content/stories/2
localhost/content/stories/3
all these should map to the definition in tiles.xml.
hope this explains my dilema.
Thanks a mill.
dynamic tiles2 definitions with spring 3'
Thanks @skram. It turns out the problem was somewhere else..anyway, @wv729, basically i had wanted to dynamically generate tiles definitions:
localhost/content/stories/1
localhost/content/stories/2
...
localhost/content/stories/n,
but decided to do it differently, with just once definition and handing parameters from controller.