} catch (Exception ex) {
}
for(Field f : clasz.getDeclaredFields()) {
BindingContext ctx = new BindingContext();
ctx.setParameterName(f.getName());
ctx.setParameterType(f.getType());
ctx.setRequest(request);
ctx.setPrefix(prefix);
DataBinder binder = DataBinders.getDataBinder(f.getType());
if (binder != null) {
String pname = ctx.getParameterName();
if (!ctx.getPrefix().equals("")) {
pname = ctx.getPrefix() + "." + pname;
}
if (request.getParameterMap().containsKey(pname)) {
f.setAccessible(true);
f.set(model, binder.bind(ctx));
}
} else {
BindingContext bc = new BindingContext();
bc.setParameterName(f.getName());
bc.setParameterType(f.getType());
bc.setRequest(ctx.getRequest());
if (ctx.getPrefix().equals("")){
bc.setPrefix(f.getName());
} else {
bc.setPrefix(ctx.getPrefix() + "." + f.getName());
}
Object value = new ObjectBinder().bind(bc);
if (value != null) {
f.setAccessible(true);
Object obj = f.get(model);
if (obj != null) {
updateModel(obj, bc.getPrefix());
f.set(model, obj);
} else {
f.set(model, value);
}
}