Java Reference
In-Depth Information
public Resolution view() {
return new ForwardResolution(VIEW);
}
/ * ... * /
}
You then define the contact_list and contact_view layouts in tiles.xml :
Download email_17/web/WEB-INF/tiles.xml
<! DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="layout_main"
template="/WEB-INF/jsp/common/layout_main.jsp"/>
<definition name="contact_list" extends="layout_main">
<put-attribute name="title" value="Contact List"/>
<put-attribute name="currentSection" value="ContactList"/>
<put-attribute name="body" value="/WEB-INF/jsp/contact_list.jsp"/>
</definition>
<definition name="contact_view" extends="layout_main">
<put-attribute name="title" value="Contact Information"/>
<put-attribute name="currentSection" value="ContactList"/>
<put-attribute name="body" value="/WEB-INF/jsp/contact_view.jsp"/>
</definition>
</tiles-definitions>
Tiles will take care of mapping the URL to the definition and assembling
layout to construct the page.
Like I said earlier, I won't go into any more detail about using Tiles.
The point here is that its integration with Stripes is easy and straight-
forward. You'll find a complete working example in the topic's sample
code.
SiteMesh
OpenSymphony SiteMesh 5 is another layout framework that has its
share of users. Because of the way it works, its integration with Stripes
is not quite as straightforward as Tiles. After adding the sitemesh.jar file
to /WEB-INF/lib , you'll need to do some configuration in web.xml .
5.
http://www.opensymphony.com/sitemesh/
 
 
Search WWH ::




Custom Search