Java Reference
In-Depth Information
layout_main.jsp
${title} <s:layout-component name="menu">
Welcome to Stripes Webmail
</s:layout-component>
<s:layout-component name="body"/>
layout_menu.jsp
<s:layout-component name="menu">
(Menu goes here)
</s:layout-component>
layout_folders.jsp
<s:layout-component name="body">
Folders ${body}
</s:layout-component>
Figure 7.3: Using three layouts for the webmail application
Next, layout_menu.jsp decorates layout_main.jsp to add the menu. The
menu component contains the real menu that is shown to the user once
they have logged in.
Finally, layout_folders.jsp decorates layout_menu.jsp to add the list of fold-
ers on the left side of the body content.
First, here's what the interesting part of layout_main.jsp looks like:
Download email_16/web/WEB-INF/jsp/common/layout_main.jsp
<div id="header">
<span class="title"> ${title} </span>
<span class="menu">
<s:layout-component name="menu">
Welcome to Stripes Webmail
</s:layout-component>
</span>
</div>
<div id="body">
<s:layout-component name="body"/>
</div>
Each renderer provides a page title and a body. The "menu" component
is placed next to the page title and contains Welcome to Stripes WebMail
 
 
Search WWH ::




Custom Search