Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to reload only body in the tiles

 
karthik chandra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used a tiles to hava a structure for my web application like the sample below. Am using JSF 1.1.

<tiles:insert definition="page.applicationLayoutNewDesign">
<tiles:put name="body" valueabcd.jsp" type="page"/>
</tiles:insert>

My header, menu structure is in tha applicationLayoutNewDesign, IS it possible if I click on the menu, only the body get reloaded and the header remain static(means doesn't load again).
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Karthik!

Tiles are (in my opinion) an abomination. I never learned to love them. In JSF, tiling can be done using the Facelets subsystem, which is available as an add-on for JSF1 and is an integral part of JSF2. So one reason to consider facelets is that unlike tiles, it's a part of the current JEE standard.

Regardless of what tiling system you use, however, you cannot update just part of a page (technical term: "partial page update") using straight HTTP. You need AJAX to do that. That is, in fact, exactly what AJAX was designed to do.

In JSF1, there is no built-in support for AJAX, although some of the third-party extension tagsets provide AJAX support that make it very easy to do partial page updates. In JSF2, ajax is additionally available as part of the core JSF JEE standard.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic