wood burning stoves 2.0*
The moose likes JSF and the fly likes validation messages to different parts of the page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "validation messages to different parts of the page" Watch "validation messages to different parts of the page" New topic
Author

validation messages to different parts of the page

baran tamer
Ranch Hand

Joined: Jan 22, 2009
Posts: 33
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

Joined: Oct 08, 2006
Posts: 2458
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

Joined: Jan 22, 2009
Posts: 33

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

Joined: Oct 08, 2006
Posts: 2458
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.
 
 
subject: validation messages to different parts of the page