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:
- create instance of class parameter instance of
- subject instance data binding
- subject instance dependency injection
- if instance
@validateable
, invoke.validate()
- 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
Post a Comment