org.apache.myfaces.extensions.cdi.core.api.config.view
Annotation Type View


@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
@Documented
@InterceptorBinding
public @interface View

Allows to restrict e.g. phase-listener methods to specific views. Use an existing view-config OR ManualView.class + the view-id string/s. Furthermore it's possible to use it at the class-level for configuring page-controllers (as an alternative to specifying the (page-)bean in the view-config). That means e.g. \@View(DemoPages.Page1.class) //... public class PageBean1 implements Serializable { \@PreRenderView protected void preRenderView() { //... } //... } leads to the invocation of the pre-render-view logic before page1 gets rendered and it won't be called for other pages.

Author:
Gerhard Petracek

Required Element Summary
 Class<? extends ViewConfig>[] value
          Specifies the pages via type-safe ViewConfig.
 
Optional Element Summary
 String[] inline
          Alternative to #value in order to use hardcoded strings instead of type-safe view-configs.
 

Element Detail

value

public abstract Class<? extends ViewConfig>[] value
Specifies the pages via type-safe ViewConfig. Use ManualView if it is required to use strings as view-id.

Returns:
views which should be aware of the bean or observer

inline

public abstract String[] inline
Alternative to #value in order to use hardcoded strings instead of type-safe view-configs.

Returns:
views which should be aware of the bean or observer
Default:
""


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.