• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question in tiles loading behavior

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in tiles definition, for example i created a layout with header and a dynamic body, this body can be page1 or page2. if im in page1 and i go to page2, will the header.jsp be loaded again or just the body?

<definition name="layout1" path="/layout/template.jsp">
<put name="header" value="/tiles/header.jsp"/>
<put name="body" value="{body}"/>
</definition>

<definition name="tiles.page1" extends="layout1">
<put name="body" value="/pages/riOut.jsp"/>
</definition>

<definition name="tiles.page2" extends="layout1">
<put name="body" value="/pages/coverDetails.jsp"/>
</definition>
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even though tiles allows you to create a composite page consiting of smaller parts, in the end, the page created is still a single HTML page. So, the answer to your question is that any time you display a different body, the header will be redisplayed also. It is after all a single page as far as the web container is concerned.
 
aleah de guzman
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is there a way that it could behave as frames? coz i dont want to reload the header everytime i do submit on the body. the header's content is not being affected by any transactions done in the body.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want it to behave as frames, I'd suggest you just use frames rather than tiles.
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
merrill is right.

loading a complete page per request is pretty much how web pages work inherently.

you can think about frames (which execute one request per frame as well, but give you control about the reload), you can also think about caching, maybe also about some asynchronous ajax technology (buzzword alarm!).

i'm using tiles with frames, the benefit is rather low compared with a no frame solution. and frames are really old school.

i'd suggest that you dont use frames. should you run into performance problems later, you can add things like caches then.

jan
 
reply
    Bookmark Topic Watch Topic
  • New Topic