Package com.et.mvc.binding

Examples of com.et.mvc.binding.DataBinder


        }
       
        int bindCount = 0//success bind field count
       
        for(Field f: ctx.getParameterType().getDeclaredFields()){
            DataBinder binder = DataBinders.getDataBinder(f.getType());
            if (binder != null){
                BindingContext bc = new BindingContext();
                bc.setParameterName(f.getName());
                bc.setParameterType(f.getType());
                bc.setRequest(ctx.getRequest());
                bc.setPrefix(ctx.getPrefix());

                Object value = binder.bind(bc);
                if (value != null) {
                  bindCount ++;
                }
                f.setAccessible(true);
                f.set(obj, value);
View Full Code Here


        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());
View Full Code Here

                    ctx.setPrefix(bind.prefix());
                }
                else{
                    ctx.setPrefix("");
                }
                DataBinder binder = DataBinders.getDataBinder(types[i]);
                if (binder == null){
                    binder = new ObjectBinder();
                }
                parameters[i] = binder.bind(ctx);
            }
        }

        Object result = getActionMethod().invoke(this, parameters);
       
View Full Code Here

TOP

Related Classes of com.et.mvc.binding.DataBinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.