*
The moose likes Groovy and the fly likes GSP validations without domain classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "GSP validations without domain classes" Watch "GSP validations without domain classes" New topic
Author

GSP validations without domain classes

Amit Sharma
Ranch Hand

Joined: Nov 22, 2005
Posts: 87
Hi

I have some textfields like email, name, mobile etc on a gsp page. I just want to validate them before saving in database, without using javascript at gsp page .
Is there any mechanism to do this in controller or somewhere else. And i am populating a bean by those parameters.


Amit Sharma SCJP 1.4, SCWCD 5, OCUP-100(UML)
Xymor RM
Greenhorn

Joined: May 03, 2009
Posts: 2
Something like this?

http://www.grails.org/Command+objects+and+Form+Validation

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You can always just call domainInstance.validate().


GenRocket - Experts at Building Test Data
Amit Sharma
Ranch Hand

Joined: Nov 22, 2005
Posts: 87
Thanks Xymor Actually i was looking for something like this only
 
Don't get me started about those stupid light bulbs.
 
subject: GSP validations without domain classes
 
Similar Threads
Displaying Data
Grails weak points
CSS issue in Grails app, but question is on CSS
Retrieve values from a bean in JSP
Groovy on Grails with eclipse