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

net.contextfw.web.application.lifecycle.View Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2010 Marko Lavikainen
 *
 * 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 net.contextfw.web.application.lifecycle;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import net.contextfw.web.application.component.Component;

/**
 * Maps a component to URL making it a view component. 
 * 
 * 

* This annotation must be used in conjunction with @PageScoped annotation *

*

* When component is marked as a view, the page initialization process can be * followed an intercepted by implementing an interface {@link ViewComponent}. * Implementing the interface is optional. *

*

* URL can be given in two formats: plain and regex. Plain urls follow path-like * convention where using * it is possible to match multiple paths *

*

* If URL is prefixed by regex: then path is matched as regular expression giving * more freedom. *

* @see PageScoped * @see ViewComponent * * @author marko * */ @Target( { TYPE }) @Retention(RUNTIME) public @interface View { /** * Maps view to given set of URLs. */ String[] url() default ""; /** * Maps view to given set of URLs that are mapped to property keys. */ String[] property() default ""; /** * Defines the parent view for this view. * *

* A view may have a parent which is initialized before this view. The parent * may choose not to initialize this view, if it is not seen necessary. *

* * @see ViewComponent */ Class parent() default Component.class; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy