Java Reference
In-Depth Information
Now that all the layouts are ready, each page of the application can use
the appropriate layout ( layout_main.jsp , layout_menu.jsp , or layout_folders.
jsp ), providing a title, the section to which it belongs, and a body. For
example, the Message List page would be as follows:
Download email_16/web/WEB-INF/jsp/message_list.jsp
<s:layout-render name="/WEB-INF/jsp/common/layout_folders.jsp"
title="Message List" currentSection="MessageList">
<s:layout-component name="body">
Message list goes here
</s:layout-component>
</s:layout-render>
to produce the following:
As we can see, layouts give us a way to organize the reusable parts of
our view code and concentrate on the specific content of each page.
7.4
If You're Used to Tiles or SiteMesh
Stripes comes with an easy-to-use, full-featured reusable layout mech-
anism. But if you're already using Tiles or SiteMesh and you're not
ready to switch, you can still use one of those frameworks for your lay-
outs within a Stripes application. Although I won't go into the details
of using either of these frameworks, I'll tell you what you need to do to
integrate them with Stripes.
Tiles
Apache Tiles 4 became popular as part of the Struts web application
framework and has since been extracted into a stand-alone framework.
Configuring Tiles for use with Stripes doesn't involve any special tricks.
4.
http://tiles.apache.org/
 
 
 
Search WWH ::




Custom Search