• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom tag as value of another custom tag  RSS feed

 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

here javascript:var tag will create a java script variable and another tag will flush out all this kind of variables at the end of file.
getUrl tag will return url for the type passed.
Is there a way to make this work without using scriptlets?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use a custom tag as the attribute of another tag.

vijaya bacina wrote:Is there a way to make this work without using scriptlets?

You never need to use scriptlets. Ever. You just need to set up your tags correctly.

For example, your 'out' tag should have the ability to put its result into a scoped variable, just like <c:out> does. That way, in your other tag, you can just use the EL to express the value as the attribute.
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I understood what you mean. i will try to change my custom tag and see.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!