All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.frameworkset.util.annotations.ModelAttribute Maven / Gradle / Ivy

Go to download

bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com

There is a newer version: 6.2.7
Show newest version
/*
 *  Copyright 2008 biaoping.yin
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.frameworkset.util.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 

Title: ModelAttribute.java

*

Description:Annotation that binds a method parameter or method return value * to a named model attribute, exposed to a web view. Supported * for {@link HandlerMapping} annotated handler classes. * *

Can be used to expose command objects to a web view, using * specific attribute names, through annotating corresponding * parameters of a {@link HandlerMapping} annotated handler method). * *

Can also be used to expose reference data to a web view * through annotating accessor methods in a controller class which * is based on {@link HandlerMapping} annotated handler methods, * with such accessor methods allowed to have any arguments that * {@link HandlerMapping} supports for handler methods, returning * the model attribute value to expose.

*

bboss workgroup

*

Copyright (c) 2008

* @Date 2010-10-24 * @author biaoping.yin * @version 1.0 */ @Target({ElementType.PARAMETER,ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface ModelAttribute { /** * The name of the model attribute to bind to. *

The default model attribute name is inferred from the declared * attribute type (i.e. the method parameter type or method return type), * based on the non-qualified class name: * e.g. "orderAddress" for class "mypackage.OrderAddress", * or "orderAddressList" for "List<mypackage.OrderAddress>". */ String name() default ""; String editor() default ""; boolean required() default false; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy