struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Gary VanMatre)
Subject RE: [Shale] Clay - Links not working
Date Thu, 01 Dec 2005 14:53:36 GMT
> Hi 
> No sooner did I send this, when I decided to clean out my Tomcat work directory 
> - and now it works. javax.faces.DEFAULT_SUFFIX hads to be set to .xml for this 
> to work. 

The RI behaves differently here.  It will allow a view id suffix with a suffix that matches
the faces servlet mappings.  Myfaces is pretty strict about this.  It wants to rename to the
value of "java.faces.DEFAULT_SUFFIX".  The ClayViewHandlerCommand intercepts the URI before
the myfaces servlet normalizes the name.  My hope was to be able to switch between view types
(jsp, xml, html) within an application but it seems that you almost need to pick one type

> Anyway, I now have a Template application which functionally behaves like it was 
> built with Tiles, meaning I have a standard page layout, and only have to worry 
> about the individual parts of it. Now, in Tiles I would define definitions in 
> the tile-config.xml file - Can I define my Clay views in the clay-config.xml 
> file instead of having to write an extra .xml file for each new view (I already 
> have to write the content (.html file))? 

Nope, If you are using full XML or HTML views as an entry point, you have to define a new
page.  This is a reflection of how JSF create the view ID from the URI.  Tiles doesn't have
this restriction.  The full XML and HTML templates are parsed on demand.  If a template is
changed, it is reloaded.  If the global config files are changes, they are reloaded and everthing
else is invalidated. 

I'm planning on making full HTML templating allowed.  

<html jsfid="/layout.html" contentBody="/page1Body.html" allowBody=false>

I can see how the Tapestry like "remove" and "content" tags would be handly here.


> Hermod 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message