You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cedric dumoulin <ce...@lifl.fr> on 2001/02/13 18:16:46 UTC

Components (Extended Templates) new web site

  Components web site has moved to new web sites :
   (main)   http://www.lifl.fr/~dumoulin/components
   (mirror) http://www.geocities.com/cedricdumoulin/components

  Please, update your bookmarks, as the old site will stop soon.

     Cedric


  For those who are new to struts-dev, Components proposal can be seen
as an extension to template proposal. It is fully compatible with David
Geary's JSP Templates implementation (except attribute 'role', but it is
in TODO list).

Components Concepts :

   * A component extends the Template concept by adding new features.
   * A component is a JSP page that can be inserted 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.
   * With Components, you can easilly build portal pages :
        o Define Components that will make your portal
        o Assemble Components in a list fashion (see the Components
          Documentation as example)
   * With Components, you can easilly build menu : just pass a lists of
     items to show, and list of links to a Component that will do the
     job.
   * Define your own Components taking parameters (simple or list), and
     doing what you want

Template mechanism :

   * Compatible with Struts JSP Templates
   * A template is a page made of components ...
   * Templates can be defined in a centralized file (see Components
     Instances)

Component Instances :

   * You fix some parameters of your component (like URLs of header and
     footer, title), 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.

Internationalization (I18n)

   * It is possible to have multiple localized copies of the same
     component, and load appropriate one according to the Locale.