aspose file tools*
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 Spring in Action this week in the Spring 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: 9305
    
  17

Darryl welcome to javaranch.

You've solved your first problem yourself, good going


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
 
subject: Using child tag information in parent.