当前位置: 首页>>代码示例>>Java>>正文


Java ViewScoped类代码示例

本文整理汇总了Java中javax.faces.bean.ViewScoped的典型用法代码示例。如果您正苦于以下问题:Java ViewScoped类的具体用法?Java ViewScoped怎么用?Java ViewScoped使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ViewScoped类属于javax.faces.bean包,在下文中一共展示了ViewScoped类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addViewScoped

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:22,代码来源:ViewScopedExtension.java

示例2: annotationsToExclude

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:joinfaces,项目名称:joinfaces,代码行数:16,代码来源:JsfClassFactory.java

示例3: addScope

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
public void addScope(@Observes final BeforeBeanDiscovery event) {
	event.addScope(ViewScoped.class, true, true);
}
 
开发者ID:fabiohxcx,项目名称:PedidoVenda,代码行数:4,代码来源:ViewContextExtension.java

示例4: getScope

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
@Override
public Class<? extends Annotation> getScope() {
	return ViewScoped.class;
}
 
开发者ID:fabiohxcx,项目名称:PedidoVenda,代码行数:5,代码来源:ViewScopedContext.java

示例5: addScope

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
public void addScope(@Observes final BeforeBeanDiscovery event)
{
	event.addScope(ViewScoped.class, true, true);
}
 
开发者ID:brenoemelo,项目名称:goFitOne,代码行数:5,代码来源:ViewContextExtension.java

示例6: getScope

import javax.faces.bean.ViewScoped; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Class<? extends Annotation> getScope()
{
    return ViewScoped.class;
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:9,代码来源:ViewScopedContext.java


注:本文中的javax.faces.bean.ViewScoped类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。