當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。