Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Tiles - need to put html, body tag ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles - need to put html, body tag ?" Watch "Tiles - need to put html, body tag ?" New topic
Author

Tiles - need to put html, body tag ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, i have a question on tiles, let say i have a interface template which include header, navigation , body, footer section, my question is it a need to put html and body tag in every page ?

i show my sample of navigation menu page as below :



do we need html and body tag in this case ? thank you !
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
No, your navigation menu page should only have the <table>.

When using Tiles, a screen is created by assembling Tiles e.g. header, footer, menu, body.
The layout pages should contain the <html></html> tags, not the individual tiles.

Realize that individual tiles are going to be included in your layout when constructing the screen. The "Tile" is not a whole page (screen), but part of a page.
Sheldon Fernandes
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
if i put the tag like body and html , will it cause any side affect ?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Realize that having a body or html tag does not affect the rendering of the tile. It's just html that gets spit out to the user's browser. I believe most browsers will not crash on multiple body or html tags but it's a good idea to keep the two only in your template.


A good workman is known by his tools.
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thank you for answering !!
 
Consider Paul's rocket mass heater.
 
subject: Tiles - need to put html, body tag ?