This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

GSP validations without domain classes

Amit Sharma
Ranch Hand

Joined: Nov 22, 2005
Posts: 87

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

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

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: GSP validations without domain classes
It's not a secret anymore!