struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net
Subject Re: [Shale] Using Standalone Tiles
Date Tue, 19 Jul 2005 14:43:46 GMT
> Le 05-07-18 à 20:05, Craig McClanahan a écrit :
> 
> > David (and others interested in Tiles+JSF),
> >
> > While you are testing the new-and-improved standalone tiles-core.jar,
> > I thought I'd report on a particular use case that worked for me, that
> > you might want to consider as well ... you can embed the <f:subview>
> > (or <s:subview> if you use the Shale version) *inside* a Tile ... it
> > doesn't have to be outside.
> >
> > This becomes particularly important when you think about how client
> > ids are generated for the JSF components inside the tile.  The subview
> > component is  NamingContainer, so it imposes its own id in the
> > generated client id for child components.  Therefore, if you use
> > something like this in your outermost layout:
> >
> >     <f:subview id="content">
> >         <tiles:insert attribute="content"/>
> >     </f:subview>
> >
> > then *any* component inside *any* content tile will have the same
> > prefix.  That can make life complicated if two different content tiles
> > have a component with the same id ... they end up with the same client
> > id, and that confuses the component tree process when the same view
> > (from the JSF perspective) is rendered with a different content tile.
> 
> Thanks, I hadn't thought of that.
> 
> > The solution is to just use <tiles:insert/> in your layout, and put
> > the <f:subview> tag for each content tile *inside* that tile (with a
> > unique id value, so all the tiles have unique client ids).  We should
> > do that in any examples you update.
> 
> Yes.
> 

What about creating a Shale tiles subview component that is a NamingContainer and performs
the include?

Along the same lines, what about extending the ShaleVariableResolver to export tiles defintions.
 Maybe simulate the "importAttribute" tag with something like this "#{tiles.pageTitle}"?


Gary


> 
> david
> 
> >
> > Craig
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message