java - What is "objectName" in Spring's ObjectError class? -
the class org.springframework.validation.objecterror has method getobjectname(), returns "the name of affected object". name? name of class? identifier someclass@732dacd1
? ...
for top-level objects, it's name supplied initiator of validation process. example:
foo foo = ...; errors errors = new beanpropertybindingresult(foo, "myfoo"); errors.reject(...); // produces objecterror objectname = "myfoo"
for nested object nested path, i.e. property name appended top-level object's name.
in case of spring mvc databinding, top-level object name model attribute name.
Comments
Post a Comment