Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding attribute to existing tag. How???  RSS feed

 
ira romanenko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all!
Could you help me?
I need to add attribute maxlength to tag <h:inputTextarea>, but don't know how to do it.
Could you give me some advises?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't add attributes to tags, whether JSF or plain JSP tags. Instead, you'd have to subclass the tag, extend it, and declare a TLD for the extended tag.

However, what you're asking for is part of the standard property set for that tag, so you don't need any extensions to do that. Here's a working example:
 
ira romanenko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, but I need inputTextarea, not inputText
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooops. Sorry about my inability to see the obvious. But isn't that set as the product of rows= x cols= ?

If not, I suppose a validator is in order.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!