wood burning stoves 2.0*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GSP validations without domain classes
 
Similar Threads
Groovy on Grails with eclipse
Retrieve values from a bean in JSP
CSS issue in Grails app, but question is on CSS
Displaying Data
Grails weak points