Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation messages to different parts of the page

 
baran tamer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello i am using an email validation, the codes are below




The first validation is obviously to avoid blank submissions and it should be "*" next to the inputtextbox , which works fine .
However i want to make a validation for the email string also , and i want to give the validation message somewhere else in the page. But the message also appears next to the text box.
How can i make it appear somewhere else in the page?. Thanks

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just give it another clientid or specify null as clientid and use <h:messages globalOnly="true">.

By the way, the HTML <font> tag is deprecated since 1998 (yes, that's 11 years ago!!). You should be using CSS for styling.
 
baran tamer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This one works, thanks a lot..

By the way can you suggest me a book or a tutorial so that i can understand it clearly what i am doing ?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSR252 JSF Specification document explains in detail why JSF is there, what it all provides and how it works.
The JSF API and JSF TLD documentation explains how to use the API and the tags.
The Sun Java EE tutorial part II chapter 10 covers JSF.
The "JSF: The Complete Reference" is a book I can recommend.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic