You can also have a look to my Components proposal, which can be seen as an extended version of the Struts JSP Templates (and is compatible with David Geary's proposal).
    http://gauss.ficsgrp.com/cdm

  Components Features :

  • Components Concept.
    • A component is a JSP page that can be assembled in any JSP pages, and that can take "parameters" (String, URLs, List, ...).
    • If well defined, components can be reused across pages.
    • Can propose "library" of reusable components.
    • A component can take lists as parameters :
      • You can define a "menu" component, and pass it a list of items to show, and a list of links. You can reuse this components as often as you want.
      • You can define a "portal" component, and pass it a lists of sub-components to include !
  • Template mechanism (Compatible with Struts JSP Templates).
    • A template is a page made of components ...
  • Component Instances :
    • You fix some parameters of your component (like URLs of header and footer), and you got an instance .
    • Central definition of instances in an XML file.
    • An instance can inherit from another instance. This allows to define a main instance , with fixed header, title, body, footer and menu, and let other instances inherit from it, just overiding requested parameters (usually body and title).
    • A "forward" in struts-config file can specify an instance as target.
  Cedric
 

Vincent Harcq wrote:

After reading the User Guide, I am not sure if Struts does have a Templating
Mechanism or not.
By that I mean one (or 2 or 3) that defines the basic structure of the site
in 3 (for example) parts : a header, the left panel and a body.  This
template will always be the jsp:forward and have two jsp:include to include
the two static (for example) header and left panes pages and one jsp:include
that would get a parameter from the request to now which page to include.
Something similar to the PetStore example.

I like that because it push a lot of DIV or LAYER HTML code in only the
template page.

Is it possible ?

_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to