• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple tag parents with classic tag children

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

In Charles Lyons book there is a brief discussion on p423 of using the TagAdapter class to obtain a simple tag parent when of a classic tag. However, in HFJS they simply say "we won't go into how to access a Simple tag parent form a Classic child tag", with a footnote that says if I'm really curious I can look in the API documentation.

Well, honestly, I'm not really that curious.

But, is it likely to be on the test? I don't feel like I really understand the details, and Lyons' discussion is *very* brief with no examples given. Do I need to go get the API dox on this topic to be ready for the exam?

Thanks!
John
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, honestly, I'm not really that curious.

But, is it likely to be on the test? I don't feel like I really understand the details, and Lyons' discussion is *very* brief with no examples given. Do I need to go get the API dox on this topic to be ready for the exam?
I was going to elaborate, but since you're not interested

But no, it won't be on the exam because it's really a container fudge and not a fundamental concept. In practise, you only need to know one fact about it to develop cooperating tags: if your tag is a classic tag which has a SimpleTag as its parent, when you invoke getParent() you will get an instance of TagAdapter which contains the parent SimpleTag, and not the SimpleTag itself. To extract the actual SimpleTag parent, call the getAdaptee() method. Such a code segment in a classic tag might look like:In practise this is usually unimportant as you'll develop cooperating tags usually either all as SimpleTags or all as classic tags.

BTW, the API docs really aren't any more detailed than the few paragraphs in my book, or what I've just mentioned above. You're not missing out!
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Charles, for the elaboration. I'll save it in my "interesting footnotes" directory to come back to when/if the situation pops up in real life.

But at this stage I'm looking to trim any fat I can from my test prep. I'll consider this to be one such topic.

Regards,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic