Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Are you doing client-side validation in your JSF applications?

Are you doing client-side validation in your JSF application? I am in Equinox and AppFuse, but it seems somewhat primitive. I'm using David Geary's corejsf-validator.jar from his Core JSF book. It hooks into Commons Validator, and while it does work - it has some issues. First of all, if you have it in your classpath when testing, it screws up Ant-style path matching in Spring (applicationContext*.xml doesn't work). Secondly, it puts all the JavaScript validation functions right in your page, rather than in an external file that can be cached by your browser.

In reality, I believe that JSF should include client-side validation as part of the spec. After all, all of the other popular Java web frameworks support it. Then again, Rails is growing in popularity and AFAIK, it doesn't support it. In addition, the popular Java webapps I've seen (JIRA, Confluence, Jive Forums) don't use it either. I'm not trying to advocate that we should all be using client-side validation in our apps, I'm merely saying it should be an option in the standard web framework for Java.

The only public (and open source) option I've found is the Commons Validator support in Shale. Will this work in a MyFaces application w/o Shale? Are there other client-validation frameworks for JSF I don't know about? Or is the best option "don't use client-side validation with JSF?"

Posted in Java at Nov 24 2005, 09:02:39 AM MST 6 Comments
Comments:

http://www.jroller.com/page/cagataycivici?entry=jsf_client_side_validators At the link above, you can find free components for jsf client side validations that include required field, compare, range, regular expression validator and validation summary. All components support customizable error messages, highlighting and etc.

Posted by 195.87.22.155 on December 15, 2005 at 07:25 AM MST #

This looks like what I'm looking for. Do you have any plans to open-source this? JavaForge provides services to do this. I'm sure other JSF users would be happy to help develop and improve this library.

Posted by Matt Raible on December 15, 2005 at 11:24 AM MST #

Yes I am planning to open source this, I have an another component called JSF Chart Creator, also a free one. Releasing the sources is always in my mind but couldnt have enough time to concentrate on it.I'm looking to javaforge now, I hope I will create an account and my submission will be accepted.

Posted by Ça?atay Çivici on December 19, 2005 at 06:31 AM MST #

Hey Matt, I've implemented some client-side validations by modifying renderers' of JSF components. here is the client-side length validation http://www.jroller.com/page/mert?entry=client_side_length_validation_for for disabling non-numeric character input http://www.jroller.com/page/mert?entry=disabling_non_numeric_character_input and the last one is for autocomplete in comboBoxes http://www.jroller.com/page/mert?entry=autocomplete_for_jsf_selectonemenu my colleagues and i (cagatay civici is one them :) salutes to him..) gonna wrap up all of these jsf goodies as a sourceforge project. we have custom navigation handler, property and value resolvers, single row selection radio buttons etc.. it's gonna be around as soon as possible.. cheers..

Posted by Mert Caliskan on December 19, 2005 at 06:53 AM MST #

hi all, i have a query in displaying the client side validation errors in JSF. if i have 5 imput component, i need to design in such a way that,when the user enters all the values of the form which contains these 5 input components, i should display the user the first field which is not bounded to the validation rule. once the user rectifies the error then only i should display the error of the next field which is not bounded to the validation rule. what i am asking is similar to the sign up form of the Yahoo mail. please get back to me immediately,if you know it.

Posted by PrasannaKarthik.S on January 06, 2006 at 10:46 AM MST #

Hi I have developed tool that can be interesting for both JSF and Seam world.

One of the features is client side validation. Some features:

1. The tool is completely configurable using annotations and XML.
2. Each generated form can function in either read-only or editable model, depending on the "editable" attribute.
3. The form uses configuration-by-exception for its field rendering for security
4. Forms may be referenced by Facelets tags to decrease application coupling.
5. Tool forces good practice for code management (different users same style)
6. Entity field property propagation to the form allows client-side validation
7. I provide two tag libraries with client-side validation and new input component types like Password, Link, Html, ColorPicker. (The first library is Seam+RichFaces, and the second library is simple JSF.)
8. I also created new field annotations like (password, link, html, javaScriptPattern, formOrder) for complete form generation.
9. Form creation and maintenance is completely handled by the tool. After entity bean updates, "fresh" forms are autogenerated to match.

More information is available here:

http://cs.ecs.baylor.edu/~cerny/formBuilder/guide.html
Currently, you can download FormBuilder from
http://cs.ecs.baylor.edu/~cerny/formBuilder/ download. Later I am planning to put it on SourceForge.net.

I welcome any feedback (even bad) on this work.

Seam community
(http://www.seamframework.org/Community/FormBuilderSeamgenExtensionAnnouncement).

Posted by Tomas Cerny on March 09, 2008 at 08:18 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed