aspose file tools
The moose likes JSF and the fly likes how to read the label name for a component Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to read the label name for a component" Watch "how to read the label name for a component" New topic
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
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
Then add it using f:attribute.
Srikanth Nittala
Greenhorn

Joined: Sep 24, 2006
Posts: 22
Thanks. I got the idea now.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to read the label name for a component
 
Similar Threads
Custom Component : Missing Update Model Phase?
Custom input validator
empty space validation
JSF validation not validating
validator not invoke