• Post Reply Bookmark Topic Watch Topic
  • New Topic

can I choose the id string for generated html tag?  RSS feed

 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I code:
<h:inputText id="myID"/>
The resulting id of the html is something like: _id0:_id1:29:myID, which messes things up for the javascripts I use. How to solve this?

Thanks in advance.

Seb
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give your form an ID. Then it will use that as the prefix.



Should result in

id="myForm:someText"
[ August 25, 2005: Message edited by: Gregg Bolinger ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!