Date: 2004-12-01T22:05:37 Editor: BillKeese <[EMAIL PROTECTED]> Wiki: Apache Struts Wiki Page: StrutsDocTiles URL: http://wiki.apache.org/struts/StrutsDocTiles
no comment Change Log: ------------------------------------------------------------------------------ @@ -1,9 +1,9 @@ ##language:en -== Tips on Tiles == += Tips on Tiles = Here are some tips on using tiles. -=== Nested tiles === -==== Problem ==== +== Nested tiles == +=== Problem === How do you do nested tiles? For example, suppose my .mainLayout is header/body/footer tiles. ||<#FF8080>Header|| ||<#80FF80>Body|| @@ -34,7 +34,7 @@ There are two possible ways. -==== Solution #1 ==== +=== Solution #1 === The first way is to use 2 definitions (plus the defaultLayout definition) in tiles-def.xml: {{{ <definition name="defaultLayout" template="/WEB-INF/layout.jsp"> @@ -57,7 +57,7 @@ This is a versatile solution but on the downside the tiles-def.xml file gets big. -==== Solution #2 ==== +=== Solution #2 === Another approach is to only use one definition (plus the defaultLayout definition) in the tiles-def.xml file. tiles-def.xml: @@ -98,3 +98,8 @@ The downside of this approach is that layout.jsp must know the list of possible arguments to (any) body.jsp page. + +== How do I refresh a single tile without changing the other ones? == +This is a common question. You are getting confused between frames and tiles. +The server combines all the tiles into a single web page (without any frames), +so you can't refresh just one tile. You have to refresh the whole page. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]