Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom tag attributes vs. attribute in JSP  RSS feed

 
Jason McIntosh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a whole set of custom tags we're using, and alot of the attributes are the same as the generic html tags. One attribute we allow for is tabIndex. We have ways in source to get/set attributes. However it seems that if I have <tabIndex = "2"> in the jsp and then I try to override it in my action by "field.removeAttribute(tabIndex).... field.addAttribute("tabIndex, "3"). I'm not seeing the changes.

I understand there are probably many ways to implement tags, but can anyone think of things we might be doing that are not allowing us to overwrite any attributes that are defined alaready in the jsp? If my jsp didn't have the tabIndex attribute, setting it seems to work fine. It's as if we're writing the tagout using our attribute list, then any attributes in the jsp are overlaying those.

Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what the "field" set and get attribute methods do, as they're proprietary to your custom tag system. Other than that, there's nothing magic about tabIndex that should prevent you from emitting html tags with it. There's probably a bug in your tag classes somewhere.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!