Package org.focusns.common.web.widget.annotation.bind

Examples of org.focusns.common.web.widget.annotation.bind.WidgetAttribute


        return widgetAttributeName;
    }

    private Object getWidgetAttributeValue(MethodParameter parameter, NativeWebRequest webRequest) {
        Class<?> widgetClass = parameter.getMethod().getDeclaringClass();
        WidgetAttribute widgetAttribute = parameter.getParameterAnnotation(WidgetAttribute.class);
        if (widgetAttribute != null) {
            String widgetAttributeName = getWidgetAttributeName(parameter, widgetAttribute);
            Object value = webRequest.getAttribute(widgetAttributeName, WebRequest.SCOPE_REQUEST);
            if (widgetAttribute.required()) {
                Assert.notNull(value, String.format("%s attribute %s can not be null!", widgetClass, widgetAttributeName));
            }
            return value;
        }
        //
View Full Code Here

TOP

Related Classes of org.focusns.common.web.widget.annotation.bind.WidgetAttribute

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.