• 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

nested tiles

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I plan to use tiles in my aplication instead of jsp pages. But since i havnt used it before, i have a few questions.
Now there are few pages with similar functionalities. It is basically a few forms for posting, but the fields are different for each category. So, there are forms for each category. But all the other things in the page, the headers the graphics etc are same. Is there a way i can replace the jsp page which contains the form according to the parameters in the url?
I hope my question is clear.
 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Azhar you could setup a layout file with header, left menu, footer etc and then a body.

so you will have to replace only the body part of the layout.

You should get a number of good articles if you googled for tiles for more details.
 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me explain it better.

I have a part of my application where the users can post articles. Now, some of the categories of articles require special forms for extra information. For others a common form is displayed.
current pages:
category 1:
mapping to category1Form.jsp
category 2:
mapping to category2Form.jsp
other categories:
mapping to commonForm.jsp

Now, I want to apply tiles to my web app.
But now I am in doubt to which is the best approach.
1) Should I have a separate page for each of these forms?
2) Should I add a an attribute to request or session scope and use the result in tiles:put?
3) is there a better way to do it?
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check this out, it should solve your problem

tiles def:


pno.jsp:


and from contentHeader.jspf



took me a while to figure out how it works, tiles is not so well-documented. if you find any better way, let me know...

hope it helps,
jan
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry mate, i started with this question of yours:


Is there a way i can replace the jsp page which contains the form according to the parameters in the url?



and provided a way where the tiles-definition controls a nested jsp. not evaluating the url. so, not exactly your question, but maybe a idea for your way to your solution.

and sorry for the stupid smiley. replace with ": P"

cheers,
jan
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic