Hi Gary,

you mean, the <component jsfid="/symbols/page1.xml" extends="basePage">
defines the "name" like in tiles.def. So i have to forward to
"symbols/page1.xml" in order to address the "clay" page???

Btw: i saw a lot of naming with "$" like symbols$xyz without getting the
point on this.

Sorry for these newbie questions!!!

Timo

-----Original Message-----
From: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 14, 2006 10:30 PM
To: Struts Users Mailing List
Subject: RE: [shale]Help needed for Clay

>From: Timo Schnölzer <[EMAIL PROTECTED]>
>
> Thx Gary,
> 
> Looks promising... 
> 
> In my case it is now just a base idea of using a template 
> (mainLayout.html) page and the "tiles" incls.
> 

You might take a look at the symbols shale usecase.  It shows two options
for alternate page entry points (XML and HTML). 

The full clay XML pages are most like tiles.  These page definitions can be
defined in a single configuration file or individual files.  In the usecase
example, they are in a single configuration file.

In the web.xml this file is declared:
!-- Clay Configuration Full XML view Resources -->
   <context-param>
      <param-name>
          org.apache.shale.clay.FULLXML_CONFIG_FILES
      </param-name>
      <param-value>
         classpath*:org/apache/shale/usecases/symbols/clay-tiles-config.xml
      </param-value>
   </context-param>


This file exists in the classpath.  In this config file you will find two
component definitions that define the page similar to a tiles-definition.

<component jsfid="/symbols/page1.xml" extends="basePage">
       <symbols>
           <set name="@title" value="Page 1"/>
           <set name="@bodyContent" value="page1Panel"/> 
           <set name="@logo"
value="http://myfaces.apache.org/images/myfaces-logo.png"/>  
           <set name="@leftContent" value="page1LeftPanel"/>       
       </symbols>
    </component>

The symbols are like the tiles "put" variables.  The "jsfid" is like the
"tiles" path attribute.  The page above extends basePage.  This definition
is in the common's config file and it's declared in the web.xml

   <!-- Clay Common Configuration Resources -->
   <context-param>
      <param-name>
        org.apache.shale.clay.COMMON_CONFIG_FILES
      </param-name>
      <param-value>
           /WEB-INF/clay-config.xml, /WEB-INF/clay-symbols-config.xml
      </param-value>
  </context-param>

The basePage defines default symbol values:

<!-- Base layout defintion  -->
    <component jsfid="basePage" extends="clay">
       <attributes>
           <set name="clayJsfid" value="/symbols/layout.html" />
       </attributes>
       <symbols>
           <set name="@title" value="Default Title"/>
           <set name="@leftContent" value="page3LeftPanel"/>
           <set name="@headercontent" value="/symbols/header.html"/>
           <set name="@logo"
value="http://struts.apache.org/images/struts.gif"/>
           <set name="@bodycontent" value="space"/>
           <set name="@footercontent" value="footerPanel"/>   
       </symbols>
    </component>

And, the base layout is a generic template:

<html>
   <head><title>@title</title></head>
   <body>
      <form>
          <table border="1">
             <tr>
                <td id="leftContent" rowspan="3"><span jsfid="clay"
clayJsfid="@leftContent" allowBody="false">Left<br/>Content</span></td>
                <td id="headerContent"><span jsfid="clay"
clayJsfid="@headercontent" allowBody="false">Header<br/>Content</span></td>
             </tr>
             <tr>
                <td id="bodyContent"><span jsfid="clay"
clayJsfid="@bodycontent" allowBody="false">Body<br/>Content</span></td>
             </tr>
             <tr>
                <td id="footerContent"><span jsfid="clay"
clayJsfid="@footercontent" allowBody="false">Footer<br/>Content</span></td>
             </tr>
          </table>
      </form>
   </body>
</html>

There's a view other details but that's the general ballpark.

> So 1st step to layouting a page. All the other concepts work fine, e.g. 
> dialog and so on. 
> 
> Thx for input 
> 
> timo 
> 
> 
> -----Original Message----- 
> From: Gary VanMatre [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 14, 2006 9:46 PM 
> To: Struts Users Mailing List 
> Subject: Re: [shale]Help needed for Clay 
> 
> >From: Timo Schnölzer 
> > 
> > Hi folks, 
> > 
> > after a good time on struts we are examinating seam and shale for jsf 
> > framework. My todays concern is the construction of the templating 
> > engine clay. I spent so much hours on a simple login page with a 
> > layout for header, menu, content and footer. The symbol example of 
> usecases did not realy help. 
> > 
> > Can someone give my advice for minimal configuration of a tapestry 
> > like example. 
> > 
> 
> You might take a look at this bugzilla ticket 
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=38482). Hopefully this 
> will be pulled in as a clay example. 
> 
> 
> > Thx alot 
> > 
> > timo 
> 
> Gary 
> 
> > 
> > 
> > --------------------------------------------------------------------- 
> > 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] 
> 


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

Reply via email to