Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bodycontent - JSP or tagdependent?

 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to custom tags and face a conceptual problem.
I have nestedtags in my JSP as follows:
<user:useragevalidation id="user">
<user:NotValidAge>You are not of valid age.</user:NotValidAge>
<user:validage>Yuo are of valid age.</user:validage>
</user:useragevalidation>

Now when i define the bodycontent of outer tag(useragevalidation) as tagdependent,I see that the inner tags are not parsed at all (dostarttag/doafterbody of inner tags are not called).
However when i change the bodycontent property to JSP,the inner tags are processed for dostarttag/doafterbody etc.,without any other change in code anywhere.

What causes this difference?Why does the tagdependent property not work in this case?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's exactly what tagdependent means; that you are planning to process the tag body and the JSP engine should not.

If that's not what youwant, don't use it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic