| Author |
jsf and validation
|
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
Does JSF have components to validate user entered values?
|
Groovy
|
 |
Varun Khanna
Ranch Hand
Joined: May 30, 2002
Posts: 1400
|
|
Yes, in fact jsf life cycle has an entire phase for performing the validation. Check out this link [ December 14, 2004: Message edited by: K Varun ]
|
- Varun
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Hello Varun, You are an JSF expert. What implementation and tools are using for developing JSF?
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Here is a chapter on validation http://www.cs.sjsu.edu/faculty/horstman/corejsf/geary-horstmann-corejsf-chapter6.pdf
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Validation is a heck of a lot simpler with JSF than with Struts. However, Sun's RI doesn't provide any client side validation. So everything goes to the server. Other vendor implementation may provide validators for client side validation. You can validate simply using the faces taglib like: You can also call a method in your backing bean to do the validation: For the standard validators that's all there is to it. You don't have to maintain any other files (like struts validator XML file(s)). [ December 15, 2004: Message edited by: Gregg Bolinger ]
|
 |
Varun Khanna
Ranch Hand
Joined: May 30, 2002
Posts: 1400
|
|
Originally posted by Pradeep Bhat: What implementation and tools are using for developing JSF?
WSAD 5.1.2 & RI 1.1
|
 |
Cay Horstmann
author
Ranch Hand
Joined: Nov 14, 2004
Posts: 77
|
|
Core JSF has a section on using the JavaScript in Struts Validator for client-side validation. That way, you don't have to write and debug your own JavaScript. Cheers, Cay
|
Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0131482025/ref=jranch-20" target="_blank" rel="nofollow">Core Java 2, Volume I - Fundamentals (7th Edition)</a>
|
 |
Varun Khanna
Ranch Hand
Joined: May 30, 2002
Posts: 1400
|
|
Originally posted by Cay Horstmann: Core JSF has a section on using the JavaScript in Struts Validator for client-side validation. That way, you don't have to write and debug your own JavaScript. Cheers, Cay
Hey Cay, Welcome to Javaranch !!! Will you advocate doing client side validations in JSF? Can you please quote some example/scenarios for the same and the advantage it will provide over the server side validations. Thanks,
|
 |
 |
|
|
subject: jsf and validation
|
|
|