On Sun, 13 Jul 2003, John Patterson wrote:

> Joseph,
>
> > > With Tiles multiple components (or values) to be placed into a template
> can
> > > be defined in an XML file or in a jsp page.  This allows complex pages
> to be
> > > composed by specifying what components you want and in what order.
> >
> > You can do the same thing with Sitemesh.
>
> Really?  How do you use Sitemesh to create two pages such that:
> a) they use the same template file
> b) they are each composed of two unique components (not just text
> properties)
> c) there is no logic in the template

> An example would be great as I can't see from the documentation how this can
> be done.

<page:applyDecorator name="panel" page="foo.action" />

foo.action can do whatever it wants. It can also be controlled from
information from the session if you like. Lo and behold.

> > > With Sitemesh only one component may be placed into the template which
> is
> > > defined by the request URL.  The template must know what pieces to put
> the
> > > in the placeholders (ie title, body).  This limits potential reuse.
> > >
> > > Or have I missed something about Sitemesh?
> >
> > Yeah, you have. There's nothing that prevents the decorator from using
> > dynamic information.
>
> But this requires the template to contain the page composition logic which
> limits its reuse potential.

"foo.action" seems generic enough to me. Same for pulling information from
session state.

> John.
>
> > > ----- Original Message -----
> > > From: "Matt Ho" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, July 11, 2003 5:53 PM
> > > Subject: Re: [OS-webwork] Webwork with Tiles
> > >
> > >
> > > > On Fri, 11 Jul 2003 12:56:21 +0100, John Patterson
> > > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > I am looking into using Webwork for an upcoming web project.  In the
> > > past
> > > > > I have used Struts with the Tiles extension which I really liked for
> its
> > > > > page layout abilities.  It seems that with Webwork most people are
> using
> > > > > Sitemesh to do something similar.  From what I can tell Sitemesh
> allows
> > > > > you to
> > > > > decorate a page with headers and footers etc. but can not do dynamic
> > > page
> > > > > composition.  Is this correct?
> > > >
> > > > This isn't entirely correct.  As you can specify which decorator to
> use in
> > > > sitemesh, you could have a Context menu mesh that does what you're
> > > > describing.  However, this logic needs to be done directly in the jsp
> > > > rather than in an xml file like tiles.  The sitemesh site,
> > > > http://www.opensymphony.com/sitemesh/, has a good drawing of this.
> > > >
> > > > M
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email sponsored by: Parasoft
> > > > Error proof Web apps, automate testing & more.
> > > > Download & eval WebKing and get a free book.
> > > > www.parasoft.com/bulletproofapps1
> > > > _______________________________________________
> > > > Opensymphony-webwork mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: Parasoft
> > > Error proof Web apps, automate testing & more.
> > > Download & eval WebKing and get a free book.
> > > www.parasoft.com/bulletproofapps1
> > > _______________________________________________
> > > Opensymphony-webwork mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > >
> >
> > -------------------------------------------------------------------
> > Joseph B. Ottinger                         http://enigmastation.com
> > IT Consultant                                [EMAIL PROTECTED]
> > J2EE Editor - Java Developer's Journal   [EMAIL PROTECTED]
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Parasoft
> > Error proof Web apps, automate testing & more.
> > Download & eval WebKing and get a free book.
> > www.parasoft.com/bulletproofapps1
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> >
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>

-------------------------------------------------------------------
Joseph B. Ottinger                         http://enigmastation.com
IT Consultant                                [EMAIL PROTECTED]
J2EE Editor - Java Developer's Journal   [EMAIL PROTECTED]



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to