Re: RES: recursive tiles
Basically subbody1 2 are just extra tiles? Try this - your tiles-defs.xml: definition name=tile.foo extends=mainTemplate put name=body value=/foo.jsp / put name=subbody1 value=/foo2.jsp / put name=subbody2 value=/minifoo.jsp / /definition in your mainTemplate.jsp, you would have: tiles:get name=body put name=subbody1 beanName=subbody1/ put name=subbody2 beanName=subbody2/ /tiles:get in your foo.jsp you would have: tiles:insert attribute=subbody1 / I haven't actually done tiles to 3 levels deep, just 2, but I've never heard of any problems with it. Adam On 12/01/2003 08:52 PM Felipe Nascimento wrote: That is my what I don´t know. I don´t know if I have to define the two components subbody1 and 2 in my foo.jsp (body file), or in my tiles-defs.xml. I suppose it is better in my tiles-defs.xml. So in foo.jsp I could only get the values and that´s it. Could you give a simple example of the definition in tiles-defs.xml, the getting and putting in foo.jsp? In your code bellow (put name=subbody1 value=subbody1/) where is defined subbody1? The name is the name in tiles-defs? And value is the jsp page? Tks a lot Felipe -Mensagem original- De: Adam Hardy [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 1 de dezembro de 2003 08:41 Para: Struts Users Mailing List Assunto: Re: recursive tiles Hi Felipe, not quite sure exactly what you want to do - where do you expect subbody1 subbody2 to come from? If you are defining them in your tiles-defs.xml then you need to pass them as variables explicitly to 'body' in your maintemplate: tiles:get name=body put name=subbody1 value=subbody1/ /tiles:get HTH Adam On 12/01/2003 06:41 AM Felipe Nascimento wrote: Hi, I have the following definition in my tiles-defs.xml: definition name=mainTemplate path=/mainTemplate.jsp put name=title value=${title} / put name=header value=/components/header.jsp / put name=menu value=/componentes/menu.jsp / put name=body value= / put name=footer value=/componentes/footer.jsp / /definition definition name=tile.foo extends=mainTemplate put name=body value=/foo.jsp / /definition In mainTemplate.jsp I have: tiles:get name=body/ What I want is to put more variable content in my foo.jsp, the same way I put in mainTemplate.jsp something like foo.jsp: tiles:get name=subBody1/ tiles:get name=subBody2/ -- struts 1.1 + tomcat 5.0.14 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: recursive tiles
I´ll try that tks a lot. Felipe - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 8:18 AM Subject: Re: RES: recursive tiles Basically subbody1 2 are just extra tiles? Try this - your tiles-defs.xml: definition name=tile.foo extends=mainTemplate put name=body value=/foo.jsp / put name=subbody1 value=/foo2.jsp / put name=subbody2 value=/minifoo.jsp / /definition in your mainTemplate.jsp, you would have: tiles:get name=body put name=subbody1 beanName=subbody1/ put name=subbody2 beanName=subbody2/ /tiles:get in your foo.jsp you would have: tiles:insert attribute=subbody1 / I haven't actually done tiles to 3 levels deep, just 2, but I've never heard of any problems with it. Adam On 12/01/2003 08:52 PM Felipe Nascimento wrote: That is my what I don´t know. I don´t know if I have to define the two components subbody1 and 2 in my foo.jsp (body file), or in my tiles-defs.xml. I suppose it is better in my tiles-defs.xml. So in foo.jsp I could only get the values and that´s it. Could you give a simple example of the definition in tiles-defs.xml, the getting and putting in foo.jsp? In your code bellow (put name=subbody1 value=subbody1/) where is defined subbody1? The name is the name in tiles-defs? And value is the jsp page? Tks a lot Felipe -Mensagem original- De: Adam Hardy [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 1 de dezembro de 2003 08:41 Para: Struts Users Mailing List Assunto: Re: recursive tiles Hi Felipe, not quite sure exactly what you want to do - where do you expect subbody1 subbody2 to come from? If you are defining them in your tiles-defs.xml then you need to pass them as variables explicitly to 'body' in your maintemplate: tiles:get name=body put name=subbody1 value=subbody1/ /tiles:get HTH Adam On 12/01/2003 06:41 AM Felipe Nascimento wrote: Hi, I have the following definition in my tiles-defs.xml: definition name=mainTemplate path=/mainTemplate.jsp put name=title value=${title} / put name=header value=/components/header.jsp / put name=menu value=/componentes/menu.jsp / put name=body value= / put name=footer value=/componentes/footer.jsp / /definition definition name=tile.foo extends=mainTemplate put name=body value=/foo.jsp / /definition In mainTemplate.jsp I have: tiles:get name=body/ What I want is to put more variable content in my foo.jsp, the same way I put in mainTemplate.jsp something like foo.jsp: tiles:get name=subBody1/ tiles:get name=subBody2/ -- struts 1.1 + tomcat 5.0.14 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: recursive tiles
That is my what I don´t know. I don´t know if I have to define the two components subbody1 and 2 in my foo.jsp (body file), or in my tiles-defs.xml. I suppose it is better in my tiles-defs.xml. So in foo.jsp I could only get the values and that´s it. Could you give a simple example of the definition in tiles-defs.xml, the getting and putting in foo.jsp? In your code bellow (put name=subbody1 value=subbody1/) where is defined subbody1? The name is the name in tiles-defs? And value is the jsp page? Tks a lot Felipe -Mensagem original- De: Adam Hardy [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 1 de dezembro de 2003 08:41 Para: Struts Users Mailing List Assunto: Re: recursive tiles Hi Felipe, not quite sure exactly what you want to do - where do you expect subbody1 subbody2 to come from? If you are defining them in your tiles-defs.xml then you need to pass them as variables explicitly to 'body' in your maintemplate: tiles:get name=body put name=subbody1 value=subbody1/ /tiles:get HTH Adam On 12/01/2003 06:41 AM Felipe Nascimento wrote: Hi, I have the following definition in my tiles-defs.xml: definition name=mainTemplate path=/mainTemplate.jsp put name=title value=${title} / put name=header value=/components/header.jsp / put name=menu value=/componentes/menu.jsp / put name=body value= / put name=footer value=/componentes/footer.jsp / /definition definition name=tile.foo extends=mainTemplate put name=body value=/foo.jsp / /definition In mainTemplate.jsp I have: tiles:get name=body/ What I want is to put more variable content in my foo.jsp, the same way I put in mainTemplate.jsp something like foo.jsp: tiles:get name=subBody1/ tiles:get name=subBody2/ -- struts 1.1 + tomcat 5.0.14 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.544 / Virus Database: 338 - Release Date: 25/11/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.544 / Virus Database: 338 - Release Date: 25/11/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]