I would use Hermod's answer to your question instead of mine, since he knows more about it and I wasn't quite awake yet when I wrote that. ;-) In any case, yes, if I'm not mistaken, any attributes you pass to an HTML element that aren't directly handled by Clay or the underlying component are treated as symbols by Clay. For example:
<span jsfid="whatever" foo="bar"></span> In this case, "foo" is treated as the symbol "@foo" by Clay. If you look in the clay-config.xml that comes with the shale-clay.jar, you'll notice that this is how many of the built-in HTML->JSF mappings are handled. Rich Eggert Member of Technical Staff Proteus Technologies, LLC http://www.proteus-technologies.com -----Original Message----- From: Bernhard Slominski [mailto:[EMAIL PROTECTED] Sent: Mon 2/26/2007 6:39 AM To: '[email protected]' Subject: AW: Clay templating Rich, thanks for the answer. I use an HTML page not a JSP page (Clay HTML View). This is useful because I don't need to define a separate component for every page. Ist this possible (to set the values of the symbols) for an HTML View too? Bernhard > -----Ursprüngliche Nachricht----- > Von: Richard Eggert [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 26. Februar 2007 12:30 > An: [email protected] > Betreff: RE: Clay templating > > > Let me see if I'm understanding you properly. Do you also > have a corresponding JSP page (start.jsp) to load the HTML > template? If so, it can contain an element like this: > > <clay:clay jsfid="basePage"> > <clay:symbol name="title" value="Application Home" /> > <clay:symbol name="bodyContent" value="/startBody.html" /> > </clay> > > This is instead of doing <clay:clay jsfid="startPage" /> > (i.e., startPage isn't strictly necessary). > > Does this help? > > > Rich Eggert > Member of Technical Staff > Proteus Technologies, LLC > http://www.proteus-technologies.com > > > > -----Original Message----- > From: Bernhard Slominski [mailto:[EMAIL PROTECTED] > Sent: Mon 2/26/2007 6:14 AM > To: '[email protected]' > Subject: Clay templating > > Hi all, > > I use Clay to build my pages with templates. > > I have a base page, all my actual pages are derived from the > base page. > My clay-config.xml looks like this > > <component jsfid="basePage" extends="clay"> > <attributes> > <set name="clayJsfid" value="/templates/layout.html" /> > </attributes> > <symbols> > <set name="@title" value="Default Title" /> > <set name="@headercontent" > value="/templates/header.html" /> > <set name="@bodycontent" value="space" /> > <set name="@footercontent" > value="/templates/footer.html" /> > </symbols> > </component> > > <component jsfid="startPage" extends="basePage"> > <symbols> > <set name="@title" value="Application Home" /> > <set name="@bodycontent" value="/startBody.html" /> > </symbols> > </component> > > The "problem" is my actual page start.html it looks like this: > > <span jsfid="startPage"/> > > So the issue I'm having is that for every page I need two files > start.html > startBody.html > > The start.html page only calls the "startPage" clay component. > So I'd like to have only one file which contains my body. > Are there any possibilties to do this? > > Thanks > > Bernhard > >
