Hi Peter,

David is right. You need frames if you want to reload just part of your page.
And yes tiles framework assembles all components and returns the accumulated
result.
But you CAN write JSP, that changes just one tile component (for example body)
of your page:

<%@ page language="Java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles"%>
<tiles:insert definition="site.mainLayout" flush="true">
  <tiles:put name="body" value="another.definition"/>
</tiles:insert>

In this JSP example you put another tile component described in
tiles-defs.xml as
another.definition in part of your previous body component /tiles/body.jsp.
But remember, that will reload all the page not only the body part.

Peace,
Aidas

David G. Friedman <[EMAIL PROTECTED]> wrote:
> Peter,
> 
> I believe you are confusing frames, or possibly "inline" frames, with tiles.
> The tile definition assembles the components of a page and hands that
> completed page back to your client's browser.  If your tiles defintion
> includes parts such as a header, footer, navigation bar, and main (i.e.
> "center") content, EVERYTHING will be assembled into a page and returned to
> the client.
> 
> To update only a section of the open browser's content, you will likely need
> either frames or "inline frames".  For more information on frames, see the
> HTML 4.01 spec.  A brief tutorial on frames is available free from the W3C
> (World Wide Web Consortium) at:
> http://www.w3.org/TR/html401/present/frames.html
> 
> One particular link at the bottom of that page can direct you to a section
> on "inline frames".
> 
> Regards,
> David
> 
> 
> 
> -----Original Message-----
> From: Peter O'Reilly [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 26, 2004 7:56 PM
> To: [EMAIL PROTECTED]
> Subject: refresh body only from JSP
> 
> Hi,
> I am using tiles in my project using the classic layout
> 
> This is my "tiles-defs.xml "
> 
>   <definition name="site.mainLayout" path="/layouts/classicLayout.jsp">
>       <put name="title"  value="The Project" />
>       <put name="header" value="/tiles/common/header.jsp" />
>       <put name="menu"   value="site.menu.bar" />
>       <put name="footer" value="/tiles/common/footer.jsp" />
>       <put name="body"   value="/tiles/body.jsp" />
>   </definition>
> 
> How can I create a JSP that will keep the header, footer and menu while only
> refreshing the body?  I keep getting the entire login.jsp page instead of it
> refeshing the body only.
> 
> Peter
> 
> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
> 
> Netscape. Just the Net You Need.
> 
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> 
> ---------------------------------------------------------------------
> 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