• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple tag parents with classic tag children

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic