spring - Problems with @InitBinder -
i have problem initbinder use in form, allowed how below ?
@initbinder public void initbinder(webdatabinder binder, webrequest request) { binder.registercustomeditor(class.class, "subclass", new propertyeditorsupport() { @override public void setastext(string text) { setvalue((text.equals("")) ? null : classdao .getclass(integer.parseint((string) text))); } }); binder.registercustomeditor(teacher.class, "teacher", new propertyeditorsupport() { @override public void setastext(string text) { setvalue((text.equals("")) ? null : teacherdao .getteacher(integer.parseint((string) text))); } }); }
if choose 1 example teacher works when @ same time 400 request error.
Comments
Post a Comment