• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to read the label name for a component

 
Srikanth Nittala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to read the label name of a component, say inputText.
The reason is that i have a requirement to display error messages like 'labelName must be a 10 digit number". I am using JSF 1.1.




I want to read this label name in my Validator method:




Thanks,
Srikanth
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the 'label' attribute of the input component.
 
Srikanth Nittala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean to use something like:



Since i am using JSF 1.1 there is no label attribute to the inputText component.

-Srikanth>
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then add it using f:attribute.
 
Srikanth Nittala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I got the idea now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic