This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

nested tiles  RSS feed

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
 
Maybe he went home and went to bed. And took this tiny ad with him:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!