• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic custom tag attributes

 
reddy raja
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to custom tags i have a requirement like i have a custom tag ex:
<html:sample attrb1="" attrb2="" attrb3=""/>
if attrb1 is given then,attrb2 is mandatoryly given else it is not mandatory can any one help me.

 
Siva Masilamani
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your custom tag can implement DynamicAttributes interface and then implement the setDynamicAttribute method and store all the attribute value in the Hashmap and then check is attr1 is given,if so then attr 2 sould be there else throw error.
 
reddy raja
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tahnk you siva
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!