File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes findAncertorWithClass() and getParent() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "findAncertorWithClass() and getParent()" Watch "findAncertorWithClass() and getParent()" New topic

findAncertorWithClass() and getParent()

Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Hi ,

Regarding this question...

<a:tagA> <-- classic tag
<c:if test="${true}">
<a:tagB /> <-- classic tag

1 - is it possible to use "getParent()" method from TagSupport for getting the "JSTL" enclosing tag??

2 - Could we utilize the static method "findAncestorWithClass" from "SimpleTagSupport" like this in TagB classis tag code:

SimpleTagSupport.findAncertorWithClass(this, TagS.class)

for helping the "tagbB", wich is a "ClassicTag", for retriving its Parent, in this case "Tag A"?

Tks again

SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
I agree. Here's the link:
subject: findAncertorWithClass() and getParent()
It's not a secret anymore!