This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested Tag example in HFSJ

 
Kevin Chapple
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic