• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom tags doubt - TLD tag

 
Devi Sri
Ranch Hand
Posts: 115
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Can anyone please tell me the scenario where we need to declare
<body-content>empty</body-content> ... in defining TLD <tag>

I feel, almost in all general applications, we need to make body-content non-empty.

Thanking you,
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could have a tag that only needs attributes. For instance, a tag that randomly picks an item from a collection and displays it:
<mine:pickOne items="${myCollection}"/>


Or you could have a tag that takes no inputs at all. For instance, it might do nothing more than spit out an icon or character that is meant to show that a particular form field is required.
<mine:required/> <input type="text" name="somethingRequired"/>
[ March 03, 2008: Message edited by: Marc Peabody ]
 
ch praveen kumar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the body of the tag is empty then apply
<body-content>empty</body-content>
or
<body-content>scriptless</body-content>

Ex: <abc:text screen="hi" section="as" />
So the above tag doesnt have any body ,it takes two attributes
so this is the example for "empty" bodycontent

Ex:<abc:button>Submit</abc:button>

here the body of the tag is containing some text,now apply the
body content as "scriptless"


Ex:<abc:section screen="dsad">
<input type="text" id="dhyusdg" name="dfd"/>
</abc:section>

for the above example apply the body content as "JSP"




with regards
praveen CH
mail id: praveenkumar.ch@cognizant.com




Originally posted by Devisri Nanubala:
Hi Ranchers,

Can anyone please tell me the scenario where we need to declare
<body-content>empty</body-content> ... in defining TLD <tag>

I feel, almost in all general applications, we need to make body-content non-empty.

Thanking you,
 
Devi Sri
Ranch Hand
Posts: 115
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Marc. I got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic