Java 类javax.faces.bean.ViewScoped 实例源码

项目:deltaspike    文件:ViewScopedExtension.java   
/**
 * javax.faces.bean.ViewScoped is no CDI Scope.
 * We need to add it programmatically to CDI.
 */
public void addViewScoped(@Observes BeforeBeanDiscovery beforeBeanDiscovery)
{
    isActivated = ClassDeactivationUtils.isActivated(getClass());

    if (isActivated)
    {
        //this extension is only needed if the cdi-based view-scope handling isn't delegated to jsf 2.2+
        isActivated = !JsfUtils.isViewScopeDelegationEnabled();
    }

    if (!isActivated)
    {
        return;
    }

    beforeBeanDiscovery.addScope(ViewScoped.class, true, true);
}
项目:joinfaces    文件:JsfClassFactory.java   
/**
 * Ignore ViewScoped, SessionScoped, RequestScoped and NoneScoped annotations
 * because spring will take care of them.
 * @return set of annotations to exclude from handlesType
 */
private Set<Class<? extends Annotation>> annotationsToExclude() {
    Set<Class<? extends Annotation>> result = new HashSet<>();
    if (this.jsfAnnotatedClassFactoryConfiguration.isExcludeScopedAnnotations()) {
        result.add(ViewScoped.class);
        result.add(SessionScoped.class);
        result.add(RequestScoped.class);
        result.add(NoneScoped.class);
    }
    return result;
}
项目:PedidoVenda    文件:ViewContextExtension.java   
public void addScope(@Observes final BeforeBeanDiscovery event) {
    event.addScope(ViewScoped.class, true, true);
}
项目:PedidoVenda    文件:ViewScopedContext.java   
@Override
public Class<? extends Annotation> getScope() {
    return ViewScoped.class;
}
项目:goFitOne    文件:ViewContextExtension.java   
public void addScope(@Observes final BeforeBeanDiscovery event)
{
    event.addScope(ViewScoped.class, true, true);
}
项目:goFitOne    文件:ViewScopedContext.java   
@Override
public Class<? extends Annotation> getScope() {
    return ViewScoped.class;
}
项目:deltaspike    文件:ViewScopedContext.java   
/**
 * {@inheritDoc}
 */
@Override
public Class<? extends Annotation> getScope()
{
    return ViewScoped.class;
}