There was just a discussion about this kind of thing.  
Please search the mailing list archives.

In short, Tapestry relies on a page's structure being 
static once loaded.  Bindings, templates, components, 
etc., simply aren't allowed to change.

However, you can pull off a lot of tricks and 
effectively skin using a variety of techniques.

First, portions of your "skin" will simply be a choice 
of stylesheets and a choice of images.  Both of these 
can be represented as assets and custom code, in a 
Border component of some form, can select the right 
assets dynamically.

In other cases, you may need to do something more 
dramatic.  You can leverage the Delegator component for 
this kind of purpose.  The Delegator allows Tapestry to 
call developer code to render a portion of a page; you 
can then dynamically generate the HTML for your "skin" 
from Java code.

It comes down to how much variation you want to provide 
for a skin.  The more variation allowed, the more work 
you'll have to do.

Another option is to have multiple versions of the same 
page with unique names that reflect the skin.  This is 
only practical when the number of possible skins is 
limited and finite, as is the number of pages to 
be "skinned".

--
[EMAIL PROTECTED]

http://tapestry.sf.net
> Howard,
>  
> I am currently evaluating Tapestry as the framework for our next product.  So 
> far I like what I see. An important feature that I need is the ability to change 
> the layout of a page and all subsequent pages, like a skin or theme.  Your 
> Border example illustrates how to specify a layout for all pages by specifying 
> the outermost component on each page (<span jwcid="Border">).  I am looking for 
> the ability to change that component dynamically for all pages. 
>  
> For example, is it possible to do something like the following?
>  
> <span jwcid=skin>
>     Lots of stuff here
> </span>
>  
> Where skin is a variable rather than a literal.  I could probably do this using 
> JavaScript but am hoping that your framework would handle this.
>  
>  
> Or alternatively
>  
> <span jwcid="skin">
>     Lots of stuff here
> </span>
>  
> where skin is defined as
>  
> <component id="skin" type="Insert">
>     <something here that indicates what page to insert> 
> </component>
>  
> This approach would allow me to insert a "page" and not just html or a property 
> from a Bean.
>  
> Thank you,
>  
> Jeff Sabin
> 

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to