Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes Tiles Reload problem??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles Reload problem???" Watch "Tiles Reload problem???" New topic

Tiles Reload problem???

Edward Durai
Ranch Hand

Joined: Oct 09, 2004
Posts: 223
Hi Guys,
I have one problem. I have a header, footer, content page and navigation page. All the pages are combined into one page using

<table border="1" width="750" cellspacing="1">
<tr><td colspan="2"><tiles:insert attribute="header" /></td></tr>
<td width="125"><tiles:insert attribute="navigation" /></td>
<td width="400"><tiles:insert attribute="body" /></td>
<tr><td colspan="2"><tiles:insert attribute="footer" /></td></tr>

But using this link when i click one link, that page is displayed in body. but all the pages reloaded. my expectation is header and footer SHOULD NOT BE loaded. Only content page should be load.

So what is the problem of this? Can I over come this??? I think it's like HTML Frames.....


Thank You<br />Edward
Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
That is the problem: you are expecting this to work like HTML frames.
Tiles and frames are different.
In fact, the tiles you specify indicate how ONE HTML file should be built, piece by piece. When it boils down to the final rendering, you will see one giant FLAT (non-framed) HTML file which is a conglomerate of all the Jsps you have specified in your Tiles definition.
Loading or reloading a page causes new HTML to be rendered for the entire page. It is useful to have HTML comments in your JSPs so you know where each one starts and stops, as these are visible when you view source.

Hope this helps.

Joined: Dec 19, 2005
Posts: 2

If both tiles and frames are different, then wats the alternative for frames when i use struts,

i hope anyone answer.

Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
If you mean a way that does not reload each frame each time, then I don't have an answer. Is it that important not to reload?
There is a element, but none for frameset that I know of.
I agree. Here's the link:
subject: Tiles Reload problem???
jQuery in Action, 3rd edition