• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validation not working after clearing the form

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a form that I use for creating and editing users. So the form fields are all getting their values from #{users.user.*}. When I want to create a user I set user = new User(); and when I want to edit a user I simple fetch the db ans set user to the user on the db.

All of the form fields are required, and most of them have a validator for length with a minimum of 3 characters. The form also has a cancel button, that clears the form (user = new User()).

So, if a user chooses to edit a user (all the form fields get filled with the user info correctly), and then cancels, and then selects to create a new user, the form fields don't validate. It doesn't validate even that the required fields are filled.

Does anyone have any clue on what may be happening?

Thanks!
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic