• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using child tag information in parent.

 
Darryl Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl welcome to javaranch.

You've solved your first problem yourself, good going
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!