Chris Pratt a écrit : > One step forward, two steps back. Now that it appears to be rendering > everything correctly, it doesn't appear to want to navigate between > the pages. For those playing the home version, the code is available > at http://www.planetpratt.com/xfer/crash5.war > > I have a very simple tiles.xml with two definitions: > > <definition name="index" template="/layout/layout.jsp"> > <put-attribute name="title" value="Crash Test Dummy" type="string"/> > <put-attribute name="body" value="/body/body.jsp" type="template"/> > </definition> > > <definition name="home" template="/layout/layout.jsp"> > <put-attribute name="title" value="Welcome Home" type="string"/> > <put-attribute name="body" value="/body/home.jsp" type="template"/> > </definition> > > And a single navigation-rule in faces-config.xml > > <navigation-rule> > <from-view-id>/index.jsp</from-view-id> > <navigation-case> > <from-outcome>success</from-outcome> > <to-view-id>/home.jsp</to-view-id> > </navigation-case> > </navigation-rule> > > But when the commandButton submits action="success" it just goes back > to the original page. I can't figure out how to get it to actually > follow the navigation rules? Any ideas? Thanks. > > (*Chris*) > > It looks like JSF's view id is "/index.tiles", not "/index.jsp". Add the following to web.xml :
|<context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.tiles</param-value> </context-param> | and modify your navigation rules to use "*.tiles" instead of "*.jsp". It should work. I don't know exactly what TilesViewHandler does but it doesn't seem necessary to make your example work. The TilesDispatchServlet is enough. Hope this helps. Nick
