Yes, I am using tiles-def.xml
If mylayout.jsp is defined in tiles-def.xml,
do I have to write a mylayout.jsp?

If yes, then I have to write 2 jsp files
for each change of body layout.


   <td>
   <html:link page="/mylayout.jsp">
   </html:link>
   </td>

Can I write only 1 jsp file for each change 
of body layout?


On Wed, 2 Mar 2005 18:21:44 -0500, Fogleson, Allen
<[EMAIL PROTECTED]> wrote:
> Eric is correct. If you use the tiles-def.xml file you can get rid of a
> lot of duplication. In this case you could do exactly what you want by
> creating definitions in the xml that extend the original and only change
> the body portion.
> 
> <definition name=".default" path="/mylayout.jsp">
>  <put name=header".../>
>  <put name="body" value="myBody.jsp"/>
>  <put name="left".../>
>  <put name="footer".../>
> </definition>
> 
> <definition name=".child" extends=".default">
>  <put name="body" value="/UserAccountMaintBody.jsp"/>
> </definition>
> 
> To me it is a lot easier to use the tiles-def.xml than it is to use the
> tiles taglib to do the "grunt" work. And I have one place to go to edit
> things if I later decide I want a new footer, or header in my child I go
> to the tiles-def.xml regardless of where the page is. (I don't have to
> have several JSP's with tiles inserts in them that I have to go and
> edit.)
> 
> Al
> 
> 
> -----Original Message-----
> From: Eric Lemle [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 02, 2005 4:29 PM
> To: user@struts.apache.org
> Subject: Re: How to reduce jsp files by using Tiles?
> 
> I think if you use the tiles-defs.xml  configuration properly you can
> eliminate lots of files.
> But I don't use that file yet.
> -Eric
> 
> >>> [EMAIL PROTECTED] 3/2/2005 12:53:59 PM >>>
> I do not think it's possible... I hope someone can
> prove me wrong.
> 
> --- Daniel PC Leung <[EMAIL PROTECTED]> wrote:
> 
> > I have a standand Tiles layout.
> > ie. it has header, Left, Body and footer.
> > In one of the body, I have this.
> >
> >     <td>
> >     <html:link page="/UserAccountMaint.jsp">
> >     <bean:message
> > key="securityMaint.userAccountMaint"/>
> >     </html:link>
> >     </td>
> >
> > Whenever it is clicked, only the body portion is
> > changed.
> > I have to use 2 jsp files to make it happen,
> >
> > UserAccountMaint.jsp:
> > <tiles:insert definition="xxx.mainLayout"
> > flush="true" >
> >   <tiles:put name="body"
> > value="/UserAccountMaintBody.jsp" />
> > </tiles:insert>
> >
> > Can I use only 1 jsp file so that only the body
> > portion is changed?
> >
> > Thanks
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
> 
> __________________________________
> Celebrate Yahoo!'s 10th Birthday!
> Yahoo! Netrospective: 100 Moments of the Web
> http://birthday.yahoo.com/netrospective/
> 
> ---------------------------------------------------------------------
> 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]
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to