Has anybody tried duplicating Ruby on Rails' layout functionality with Apache Tiles 2 ? I'm trying to integrate Tiles 2 with Spring. I have a previously written custom view resolver for the Spring framework that does this quite nicely, but I'm upgrading to Spring Webflow 2 and I need to be able to integrate Tiles 2
A:
I've done exactly this. Here's some snippets from that Java app.
<definition name="registration" template="/tiles/layouts/defaultLayout.jsp">
<put-attribute name="body" value="undefined" />
<put-attribute name="footer" value="/tiles/footer.jsp?alt=true" />
</definition>
<definition name="site.signup" extends="registration">
<put-attribute name="page" value="Signup" />
<put-attribute name="body" value="/jsp/common/signup.jsp" />
</definition>
Something like that worked for us. It's been a while (I've fled to the Ruby world) so I couldn't honestly actually explain what any of that actually means.
Otto
2009-02-01 19:47:44
Hi Otto,Thank you for your response, I guess I should have been a bit more clear in my question : I'm looking for a solution that's convention-based. I already wound up moving to the same solution you've presented, but it's very verbose and requires explicit definition of all of the views.
Alex Marshall
2009-02-22 23:11:09