Hi

I tried your recipe, but it does not seem to work. It really excited me with 
the parameter substitution, which looks a lot like what I have been testing 
with Facelets. I am looking to replace Tiles with either Clay of Facelets, so 
it would be nice to verify that the Clay way of doing templating does actually 
work. 

Facelets does work except for one thing: It does not include html comments from 
the Template (which i really need - Include (IE5) hidden Style)

When I try to access page1.faces, it complains about not finding page1.jsp. It 
does not seem to want to look for page1.xml. I have set up

Hermod

-----Original Message-----
From: Gary VanMatre [mailto:[EMAIL PROTECTED]
Sent: Monday, November 28, 2005 11:17 PM
To: Struts Users Mailing List; Struts Users Mailing List
Cc: Alexandre Poitras
Subject: Re: [shale] Clay templating


> By the way, I will try to write some documentation for Clay. I already
> have to do it but in french, so I guess a little translation won't be
> too difficult and can help the community. In my mind, Clay is the
> component that need the most explanations in Shale Frameworks. So if
> any developpers read this, feel free to post many details.
> 

That would be outstanding.  I've been holding off on Clay documentation for a 
couple reasons.  I've been spending most of my time with features and I'm also 
holding out on some help (someone currently working on a couple of books 
besides speaking at the NFJS :-).      

> On 11/28/05, Alexandre Poitras <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to get a grasp on Struts Clay. I understand there are 4
> > ways of using it and wich one you might want to use depends of the
> > situation.
> >
> > I would like to do something similar to what is found in the rolodex
> > usecase, ie. define a component layout in his own html files (like the
> > adress panel in rolodex or Tapestry components). To be able to do
> > that, Rolodex seems to use the jsp tags approach but I don't
> > understand totally how it is done for the moment. I wanted to know if
> > someone could give me some hints about it (like the necessary steps)
> > and if I could use another aproach.
> >

There are a number a options but this is the one made available yesterday:

You could start with an XML full view that is loaded on demand (page1.xml):

<view>
    <component jsfid="/page1.xml" extends="baseLayout">
        <symbols>
              <set name="title" value="Page 1"/>
              <set name="bodyContent" value="/page1Body.html"/>
        </symbols>
    </component>
</view>


In your common/global XML config loaded on startup:

<view>
    <component jsfid="baseLayout" extends="clay">
        <attributes>
            <set name="clayJsfid" value="/layout.html"/>
        </attributes>
        <symbols>
              <set name="title" value="Hello World"/>
              <set name="leftContent" value="/defaultLeftNav.html"/>
              <set name="headerContent" value="/defaultHeader.html"/>
              <set name="bodyContent" value="/defaultBody.html"/>
              <set name="footerContent" value="/defaultFooter"/>
        </symbols>
    </component>
</view>



And,  then create layout.html

<html>
     <head><title>@title</title></head>
      <body>
             <table>
                  <tr>
                        <td rowspan=3><span jsfid=clay [EMAIL PROTECTED]  
allowBody=false>Left Content</span></td>
                        <td><span jsfid=clay [EMAIL PROTECTED] 
allowbody=false>Header Content</span></td> 
                  </tr>
                  <tr>
                        <td><span jsfid=clay [EMAIL PROTECTED] 
allowBody=false>Body Content</span>Body Content</td>
                  </tr>
                  <tr>
                        <td><span jsfid=clay [EMAIL PROTECTED] 
allowBody=false>Body Content</span>Body Content</td>
                  </tr> 
             </table>
      </body>
</html>


This kind of layout only works with the full XML and JSP views as the "view id" 
but using an HTML entry page wouldn't add much value anyway.


Gary



> > Thank
> >
> > --
> > Alexandre Poitras
> > Québec, Canada
> >
> 
> 
> --
> Alexandre Poitras
> Québec, Canada
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



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



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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

Reply via email to