grails - The [method] action accepts a parameter of type [org...JSONObject] which has not been marked with @Validateable. -


i having warning:

warning |the [addpeople] action accepts parameter of type [org.codehaus.groovy.grails.web.json.jsonobject] has not been marked @validateable.  data binding still applied command object instance not validateable.     def addpeople(jsonobject jsonsito) { 

if change jsonobject def, warning dissapear. sure reference jsonobject. doing avoid future permgem error.

anyone can explain how can mark @validateable obj?

thanks in advance.

anyone can explain how can mark @validateable obj?

you can't. jsonobject class not part of code don't make @validateable.

when controller action accepts parameter @ compile time grails generates bunch of code you. in summary, generated code following:

  1. create instance of class parameter instance of
  2. subject instance data binding
  3. subject instance dependency injection
  4. if instance @validateable, invoke .validate()
  5. then code in method gets executed

step 4 conditional , happen if object @validateable. in case won't be, fine. warning letting know that.

as side note, process described above different if parameter type domain class, string, 1 of 8 primitive types or 1 of 8 type wrappers. described above how system behaves other types.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -