Author
how to read the label name for a component
Srikanth Nittala
Greenhorn
Joined: Sep 24, 2006
Posts: 22
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
Joined: Oct 08, 2006
Posts: 2458
posted Jan 28, 2009 05:11:53
0
Use the 'label' attribute of the input component.
Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
Srikanth Nittala
Greenhorn
Joined: Sep 24, 2006
Posts: 22
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
Joined: Oct 08, 2006
Posts: 2458
posted Jan 28, 2009 11:01:26
0
Then add it using f:attribute.
Srikanth Nittala
Greenhorn
Joined: Sep 24, 2006
Posts: 22
Thanks. I got the idea now.
subject: how to read the label name for a component