File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Nested Tag example in HFSJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Nested Tag example in HFSJ" Watch "Nested Tag example in HFSJ" New topic
Author

Nested Tag example in HFSJ

Kevin Chapple
Greenhorn

Joined: Aug 06, 2005
Posts: 11
Hi everyone,

I've been trying to get my head round nested custom tags and have a query about the Nestedtag example in HFSJ.

The code in the tag is




In the JSP



With output

Tag nested Level: 0
Tag nested Level: 1
Tag nested Level: 2



I dont really understand the code and how the out put is generated. I am confused about nested Tags and what order the tag returns output when they are nested.

In this example does the outermost Nested tag print out the ' Tag nested Level:0' first because the getParent() tag returns 'Null'?Then does the first inner tag return the 'Tag nested Level:1' due to get Parent() returning a non null result once which increments the 'nestLevel' by 1? Then the most nested tag incrementing the 'nestLevel' twice due to getParent() being called twice until returning null

I dont understand the flow of actication of the tags in the example and why the output is what it is.

Thanks in advance for taking the time to review my query



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested Tag example in HFSJ