Woa, I may have gotten it working (although I don't truly understand why).
Basically what the ViewHandler does is try to figure out which tile
needs to be executed, then dispatches to the tile name with the suffix
".tiles". What appeared to be happening was somehow the tiles
processor got confused by the relative reference and started looking
for /layout/index instead of index (how it even found out about the
layout directory at this point is beyond me). But by prefixing the
tile name with a slash, it "appears" to be working. I simply changed
the line in dispatchToTile to
xCtx.dispatch('/' + tileName + ".tiles");
And it worked!
Thanks for everyones help. If anyone knows why any of this works the
way it does, I'd appreciate the heads up, but it looks like this might
at least keep me moving. Thanks again.
(*Chris*)
On 9/6/07, Chris Pratt <[EMAIL PROTECTED]> wrote:
> > Chris,
> > Without the class from Ray, I see an infinite recursion in the log: it
> > seems that "index.jsp" tries to include itself!
> > Strange... The investigation goes on :-)
> >
> > Antonio
> >
>
> That part baffled me a bit too. At that point all that's happened is
> that the browser has requested the welcome file, which is specified as
> "index.jsp". index.jsp simply contains:
>
> <%@ page session="false"%>
> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
> <tiles:insertDefinition name="index"/>
>
> Which doesn't contain any JSF at all and should go directly to the
> only definition specified in tiles.xml
>
> <definition name="index" template="/layout/layout.jsf">
> <put-attribute name="title" value="Crash Test Dummy" type="string"/>
> <put-attribute name="body" value="/body/body.jsp" type="template"/>
> </definition>
>
> but somehow it seems to get lost.
>
> I'm not sure why including Ray's ViewHandler should change anything at
> this point, since it's all been straight JSP, but I expect it has
> something to do with having the FacesServlet in the mix.
>
> I hope Ray doesn't mind, but I put up a new version of the war file
> that includes the ViewHandler at
> http://www.planetpratt.com/Xfer/crash2.war in case you want to take a
> look. Thanks for looking into this, I really appreciate it.
> (*Chris*)
>