struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: [s2] templating approach / own tag?
Date Fri, 02 Nov 2007 14:50:31 GMT
2007/11/2, lbastil <basti-unterwegs@gmx.de>:
>
>
> Hi,
>
> I want to archive the following:
>
> I noticed in my page code often this redundant structure:
> (dynamic parts in [])
>
>
> <div id="headerTitle">
> [Header Section Name]
> </div>
> <div id="headerContent">
> [
> ... various different content, tables, ... and so on
> ]
> </div>
>
> Now I would like to create some parameterized template, something I could
> call like:
> (pseudocode):
> <Section title="[Header Section Name]">
> [
> ... various different content, tables, ... and so on
> ]
> </Section>
>
> which produces the code shown above dynamically.
>
> How can I do this most easy with struts2 framework?
> (in struts1 I would have created an own tag)



I think this is a task for Tiles :-)
http://tiles.apache.org/
Struts 2 contains a Tiles plugin:
http://struts.apache.org/2.x/docs/tiles-plugin.html

Antonio

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