Announcement Announcement Module
No announcement yet.
Error message handling in Grails Controller Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error message handling in Grails Controller


    I would like to know the syntaxe for showing error messages when a field is not properly filled on my *.gsp

    1- The examples I've seen on the internet impose that the constraints for the fields are defined inside the domain class but actually I dont want to use domain classes.
    I want an external Spring application to deal with the Business Logic so I would prefer to define my constraints inside the grails controller or by checking what comes in the params and then do something in order to show the error message on the gsp if the gsp fields are not properly filled.

    2- Also I would need that message to be shown according to the language so I know I have to define the error messages in all the languages in the properties files under i18n but then how do I do it?

    Thanks a lot for your support