• 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

use tiles to configure a "deep" layout

 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

let me start with an example to make my problem / misconception clear:

i have a tiles-config which describes my common page layout
(simplified


if have a page which assembles my jsp:



works fine. :-)

but say i have a component "userlist.jspf" on admin.jspf, which i want to use sometimes and from multiple places. i want to be able to insert it in my tiles config. or say i want to use admin.jspf in different configurations, sometimes with a userliser (for a super admin), sometimes without (for a normal admin).

i thought i put it like this:



no changes on page.jsp, but i like to insert


somewhere on admin.jspf.

does not work :-( <body_include> is unknown from within admin.jspf

i figured out that each <tiles:insert> creates a new ComponentContext, which is empty if i try to evaluate it from admin.jspf tried a lot with <tiles:importattribute>, but does not work either. :-(

what i'd like to achieve is clear: being able to control my page and all of its sub-components with one central definition. and evaluate it from all the way down the hierachy, not only from the first level (page.jsp).

any help appreaciated,
many thanks,
jan.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding this line in common/page.jsp, the page that assembles the tiles:

before the piece of code that inserts the body. Its worked for me, so should be the same for you.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a million so far...

i see the parameter is written into the request, and i am able to dump it. but - stupid me - how am i able to call my appropriate insertion now?

this is in the request:


that's what i'm trying:


That's what I get:


note that the path is mixed up and wrong...

how are you calling / processing it?

many greetings,
jan
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


works like a charm...

many thanks again,
jan
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!