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

Custom Tag Query

 
Ankit Nagpal
Ranch Hand
Posts: 47
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a custom tag in my web app which outputs another custom tag.

E.g.
<myTags:myTag1 /> outputs text <myTags:myTag2 />

Is there any way by which the above output is also evaluated? i.e. result of <myTags:myTag2 /> is expected.

Thanks in advance.
 
Timothy Schmelter
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,

I am not sure I completely understand your question. Are you saying:
  • You have a custom tag myTag1
  • myTag1 is supposed to output the results of the custom tag myTag2
  • Instead, myTag1 outputs the literal string <myTags:myTag2/>

  • ?

    If so, check to make sure that the declarations of myTag1 are properly configured to accept "scriptless" body content, not "tagdependent." See these links:
  • http://www.coderanch.com/t/173754/java-Web-Component-SCWCD/certification/Scriptless-vs-Tag-Dependent
  • http://www.coderanch.com/t/452499/java-Web-Component-SCWCD/certification/Tags-body-content-element
  • http://www.coderanch.com/how-to/java/BodyTagContent


  • It sounds like you may have myTag1 configured as tagdependent.

    If not, give us some more details and we can look at it a bit more.

    --Tim
     
    Ankit Nagpal
    Ranch Hand
    Posts: 47
    Eclipse IDE Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Tim,

    Answer to all your questions is yes. myTag1 is printing a string "<myTag:myTag2 />" and I want that the output of this output should be printed. Is there a way that the string returned from the custom tag be rendered again?

    Thanks.
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 65227
    95
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    No. Custom tags are evaluated at translation time, long before your tag executes.

    The only situation in which embedded custom tags will be evaluated is when the parent tag is a tag file.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic