This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Using child tag information in parent. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Using child tag information in parent." Watch "Using child tag information in parent." New topic
Author

Using child tag information in parent.

Darryl Smith
Greenhorn

Joined: Aug 06, 2010
Posts: 5
Hi

Just ran into an issue where I have 2 tags, both simple tags.

The child tag provides information to the parent which is supposed to use that information to change it's behavior. The problem
being that the parent's doTag() method executes before the child tag has set values in the parent tag. I could call the parent's
doTag() method again although this would be very tacky. Any assistance would be appreciated.

Darryl Smith.

Darryl Smith
Greenhorn

Joined: Aug 06, 2010
Posts: 5
Ahhh

To answer my own question in the parent's doTag() method do the following to allow the child tag to
execute and thereby setting the parent values.


Darryl Smith
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

Darryl welcome to javaranch.

You've solved your first problem yourself, good going


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using child tag information in parent.
 
Similar Threads
About Overridden II (a Mock Question question...)
Reg. invoking private methods
Custom tags: how to get the number of "child" tags
Question (...Inheritance)
how to get child attribute in parent tag