aspose file tools*
The moose likes JSP and the fly likes Create nested tag files, which pass information from outer to inner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Create nested tag files, which pass information from outer to inner" Watch "Create nested tag files, which pass information from outer to inner" New topic
Author

Create nested tag files, which pass information from outer to inner

Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
I want to create nested tag files, which pass information from outer to inner.

I tried the following

Parent tag called repeater.tag as given below


Child tag is header.tag as given below


Now my test.jsp has the following content


I was expecting the the out put as Header = true
but it doesn't happen because header.tag doesn't know anything about the EL variable .

I am confused .
I am setting setHeader as a EL varaible and it has a NESTED scope in the repeater.tag

header.tag is nested inside the repeater so theoretically the EL variable must be accessible for it isn't it ?

But I am wrong why ? & Where ?
Do you have an idea ?


I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I can't tell much about it, but I suspect that the variable is made available in the tag and its caller page. The header tag uses its own page context, that would be why you can't access the variable. I don't remember if there's a way to synchronize variables for inner tag files...
If you can't find out how to do it, you could use an attribute for the header tag. The spec also recommends that for IN parameters, you should use attributes.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create nested tag files, which pass information from outer to inner