Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Frames with Tiles

 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a question ����.see in my project I am planning to use Frames in my jps and I am using Struts.so I thought of tiles but they are not the replacement for the frames. I don�t want top refresh my haeder and footer everytime .so I must go for Frames as tiles will refresh the page everytime.

And is it possibel to mix tiles with Frames and use them ? If so how advantageous is this in achieving reusability in jsps�������.because if we use frames and mix that with tiles like <Frame src=<tiles:getAsString�>�/> ����..then in that src I will loose the reusability if that jsp has two sections �������..


Can anyone help me in this regard???
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tiles has nothing to do with frames

my 2 cents...
you need a really good reason to use frames. tiles is a much better solution in general
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

One thing i know that tiles is advantageous over frames and they are totally different but i have a limitation that i shouldnt refresh all the static parts of my page (Header and footer) so i should go for frames for this.If i use frames how can i accomodate tiles is the question ??

Any ideas on this would be appreciable
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If all you what is content to refresh then try something like this:


<tiles-definitions>

<definition name=".root" path="/templates/layout.jsp" >
<put name="header" value="/templates/header.jsp"/>
<put name="footer" value="/templates/footer.jsp"/>
</definition>


<definition name=".jsp1" extends=".root" >
<put name="content" value="/WEB-INF/form/jsp1.jsp"/>
</definition>

<definition name=".jsp2" extends=".root" >
<put name="content" value="/WEB-INF/form/jsp2.jsp"/>
</definition>

</tiles-definitions>
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

even if we use the above said definition by extending that will still refresh the page .I feel the advantage of this definition is reusability and hence avoiding writinh the code many times.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic