struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken <>
Subject Re: Page composition strategy
Date Thu, 24 Jun 2010 21:11:47 GMT
On Wed, 2010-06-23 at 10:36 +0100, Alex Rodriguez Lopez wrote:

> I've been using Tiles and always found it confusing a little bit, now 
> that I'm starting to test Sitemesh my vote would be for this last one. 
> They accomplish the same thing, only Tiles is like saying each time "my 
> page is made up of this, this and this". Sitemesh is more about taking a 
> piece of a page and decorate it into a full page (more like 
> "intercepting" or filtering).

I'd say that Tiles is like saying
only _once_ that my base page is
made of this and this... and each
subsequent page you should say
"extends" the base page, in my case
this means that
a different jsp is embedded into the
body which means a definition only
has one line.

Each definition can of course
override any of the content in base,
for instance my base
has a left menu, header, body and
footer all defined, a tiles
definition typically overrides the
portion, but say I made a
"secureLayout" definition then every
page that a user needs to log in 
to see will simply extend the
"secureLayout" definition.  I have a
layout for displaying records...
"recordLayout" which redefines the
header and footer to provide
information such as where
the data was derived and how many
records and navigation between the
pages of the table.

JSP's that then display records over
ride the body section of
"recordLayout" which simply
a different header and footer of the
Secure Layout. 

I don't think you can get much more
simple than Tiles.  I'm not sure if
it is the right approach if 
you had a really modular layout (say
you needed to let users add widgets
to any page).  But if the layout is
hierarchical I'd say it's the way to

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message