Hello all,

I made a test with the full xml view approach and it's working as expected - 
thank you! 
The additional clay config file provides a separation between "normal" 
component definitions and "view composition" definitions, which is something I 
welcome!

I use the suffix ".page" and removed all other suffix mappings for the 
FacesServlet. My web.xml is much cleaner now.

I should make a Wiki entry for this...

Thanx,

René


----- Original Message -----
From: Gary VanMatre
[mailto:[EMAIL PROTECTED]
To: [email protected]
Sent: Fri, 28 Jul
2006 04:22:00 +0200
Subject: Re: Clay: "virtual" jsfid values (similar to
Tiles)


> >From: "Ryan Wynn" <[EMAIL PROTECTED]> 
> >
> > On 7/27/06, René Zanner wrote: 
> > > Hi folks, 
> > > 
> > > I'm missing something in Clay's full HTML views which is known from the
> Tiles 
> > integration. 
> > > 
> > > In a JSF/Tiles integration, when specifying a view id, this id is looked
> up in 
> > the tiles-defs.xml first (maybe after some processing of the view id, e.g.
> 
> > replacing the extension and so on). Only when there's no tiles definition
> found 
> > by that name, the request is dispatched to the default view handler (that
> is, to 
> > the file system to search for a corresponding JSP file). 
> > > 
> > > When specifying a view id with Clay, the suffix is checked first. When
> it's 
> > *.html or *.xml, it's supposed to be a file template and Clay tries to
> load that 
> > file. 
> > > 
> > > So, when specifying a view id like /clay.html, I MUST have a
> corresponding 
> > clay.html file in the document root of my web application, even if it has
> only 
> > the meaningless content: 
> > > 
> > > 
> > > 
> > > 
> > > Is there a way to avoid this? 
> > > 
> > > I want to use Tiles like page composition. My Clay config file contains
> a base 
> > layout definition and a page composition definition. 
> > > 
> 
> [snippet]
> 
> > > 
> > > I just want to request the page composition id (/pageCompositionId.html)
> and 
> > receive the corresponding composite from the Clay config - without that 
> > superfluous HTML template. 
> > > 
> > 
> > I think that sounds like a good idea. How about a special view id 
> > suffix like pageCompositionId.component or for brevity 
> > pageCompositionId.clay which creates the base Clay component in the 
> > tree with clayJsfid="pageCompositionId". 
> > 
> > What do you think, Gary? 
> > 
> 
> What I called the full XML views will allow you do do this.  The default 
> suffix is .xml but you could use something else (.asp !)
> 
> The common config would look something like this:
> 
> <view>   
>     <component jsfid="/index.xml" extends="basePage">
>        <symbols>
>            <set name="@bodycontent" value="/pages/index.html"/> 
>        </symbols>
>     </component>
>     <component jsfid="/logon.xml" extends="basePage">
>        <symbols>
>            <!-- <set name="@bodycontent" value="/logon_ns.html"/> -->
>            <set name="@bodycontent" value="/pages/logon_tap.html"/>
>        </symbols>
>     </component>
>     <component jsfid="/mainMenu.xml" extends="basePage">
>        <symbols>
>            <set name="@bodycontent" value="/pages/mainMenu.html"/> 
>        </symbols>
>     </component>
>     <component jsfid="/registration.xml" extends="basePage">
>        <symbols>
>            <set name="@title" value="registrationTitle"/>
>            <set name="@bodycontent" value="/pages/registration.html"/> 
>        </symbols>
>     </component>
>     <component jsfid="/subscription.xml" extends="basePage">
>        <symbols>
>            <set name="@title" value="subscriptionTitle"/>
>            <set name="@bodycontent" value="/pages/subscription.html"/> 
>        </symbols>
>     </component>
>         
> </view>
> 
> > 
> > 
> > > Thank you very much! 
> > > 
> > > Cheers, 
> > > 
> > > René 
> > > 
> 

Reply via email to