tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen More" <stephen.m...@gmail.com>
Subject Re: MyFaces and Tiles
Date Mon, 17 Sep 2007 22:01:07 GMT
Perhaps it is premature to use Tiles2 with JSF in production.

Tomahawk has built-in support to use tiles that is included with
struts 1.x, this is path I plan to take.

I created a feature request to add tiles2 support to tomahawk:
https://issues.apache.org/jira/browse/TOMAHAWK-1115

Perhaps you could vote on it and help get this going ?

-Steve More

On 9/17/07, Chris Pratt <the......om> wrote:
> On 9/6/07, Chris Pratt <the......om> wrote:
> > On 9/6/07, Ray Clough <rcc....om> wrote:
> > > Are you remembering to set flush=false, and include everything in a
> > > subview, which we do like this in our 'template.jspx" file:
> > >
> > > <f:subview id="menu">
> > >         <tiles:insertAttribute name="menu" flush="false" />
> > >  </f:subview>
> > >
> > > - Ray Clough
> > >
> > >
> > >
> > Yup, the layout.jsp is basically:
> >
> > <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> > <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > <f:view>
> >   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> >     <head>
> >       <title><tiles:insertAttribute name="title"/></title>
> >     </head>
> >     <body>
> >       <tiles:insertAttribute name="body" flush="false" ignore="true"/>
> >     </body>
> >   </html>
> > </f:view>
> >
> > And I'm not creating a sub-view since the included body is a simple <p> tag.
> >
> > But I'm not sure you've seen my latest post, It seemed to have
> > something to do with the relative reference generated in the
> > dispatchToTile method in the ViewHandler.  Thanks for all your help.
> >   (*Chris*)
> >
> Well, it looks like going forward there are still problems to solve.
> My tiles definition looks like this:
>
>   <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>
>
> /layout/layout.jsp contains the main <f:view> that encompasses all the
> tiles inserts.
>
> /body/body.jsp contains an <f:subview> and a <h:form> containing a few
> controls.  But when the form gets generated it has the wrong action!
> The generated form comes out like:
>
> <form id="body:_idJsp0" name="body:_idJsp0" method="post"
> action="/crash/layout/layout.jsf"
> enctype="application/x-www-form-urlencoded">
>
> Notice that the action is getting set to the name of the main layout
> template, not back to something that JSF can properly route.
>
> Has anyone been able to get Tiles and JSF working together properly?
> Any help would be massively appreciated.
>   (*Chris*)
>

Mime
View raw message