• Post Reply Bookmark Topic Watch Topic
  • New Topic

BodyTag  RSS feed

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am not sure what specfically a BodyTag does that Tag does not do. Can someone kindly provide an example?
Thank you.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or the differences between BodyTagSupport and TagSupport? Please help...
 
Vels Manian
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The class u extend purely depends on ur tags requirement.
If ur tag has a body and needs processing u can extend BodyTagSupport so that u can override the methods namely
- doInitBody()
- doAfterBody() and
- getBodyContent()
For example
If u develop a tag to loop through the result set u have obtained u can use BodyTagSupport
Repeat tag.
<sql:Repeat id="emp">
<sql:Replace field="empid"/>
<sql:Replace field="empname"/>
</sql:Repeat>
If ur tag has no body and needs no processing then u can extend TagSupport.
For example
The Replace tag specified above
Hope this helps
Regards
Vels

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!