> <span jwcid="$Border">
> .. blah blah blah
> </span>
>
> Now considering the case where there are different layout patterns, which
> have different Border.html pages for initial layout of where the content
> goes, how will we handle the scenario?

I assume you mean @Border not $Border

I don't like the using the @Border much as it tends to lock me into the 
exact same html on all pages, but given that choice here goes;
You would specify a parameter for your border component and have an @If in 
your @Border template to differentiate on the html generated.

If it is strict layout changing you can often get around it by switching css 
depending on needs and make the html less presentation oriented.

> Also considering the pet store example of using screen-definition [The
> composite pattern to define various components of a jsp and join them in a
> template], where I can call a single jsp in various 'templates'. How can I
> implement such a feature using Tapestry?

@Block or custom components.

I think you are thinking about a very common of general layout of your site. 
This is what my solution looks like:

<html jwcid="@DefaultingShell" title="Contact" 
defaults="ognl:identity.shellDefaults">

<head jwcid="$remove$">
<title>BlingOn Contact</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/full.css"/>
</head>

<body jwcid="@Body" class="cream">
   <div id="backimg"> <img src="images/infopage-background.gif"/> </div>
  <div id="header">
    <div id="caption"> <img src="images/info-contact-title.gif"/>
      <p>We wish to engage in our world</p>
    </div>
  </div>
  <div id="outer">
 <div id="left">
   <div id="navigate">
            <div jwcid="@NavigationBar">
                 <a href="Home.html">HOME</a>
                 <a href="Help.html">HELP</a>
                 <a href="About.html">ABOUT</a>
                 <a href="Contact.html">CONTACT</a>
            </div>
         </div>
 </div>

  <div id="middle">
    <div id="content">
    <p>Do you have suggestions, ideas, comments, or do you just want to talk 
with
      us?</p>
    </div>
  </div>
 <div id="right"></div>
  </div>

  <div id="footer" jwcid="@Footer">copyright 2004, 2005<br/>Terms and 
conditions</div>
</body>
</html>

This allows me to vary the class tag on the body, and the contents of the 
header which would normally be part of the @Border component. The html of 
the page is pretty simple, so duplicating it on all page templates seems 
like a tiny tradeoff when getting the benefit of flexibility.
Another benefit I really like is that the static web design and the actual 
page templates are essentially the same, and you can instruct a competent 
web designer to include the extra tags.

Henrik 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to