/**
* 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);
}
java类javax.faces.bean.ViewScoped的实例源码
ViewScopedExtension.java 文件源码
项目:deltaspike
阅读 22
收藏 0
点赞 0
评论 0
JsfClassFactory.java 文件源码
项目:joinfaces
阅读 24
收藏 0
点赞 0
评论 0
/**
* 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;
}
ViewContextExtension.java 文件源码
项目:PedidoVenda
阅读 22
收藏 0
点赞 0
评论 0
public void addScope(@Observes final BeforeBeanDiscovery event) {
event.addScope(ViewScoped.class, true, true);
}
ViewScopedContext.java 文件源码
项目:PedidoVenda
阅读 23
收藏 0
点赞 0
评论 0
@Override
public Class<? extends Annotation> getScope() {
return ViewScoped.class;
}
ViewContextExtension.java 文件源码
项目:goFitOne
阅读 24
收藏 0
点赞 0
评论 0
public void addScope(@Observes final BeforeBeanDiscovery event)
{
event.addScope(ViewScoped.class, true, true);
}
ViewScopedContext.java 文件源码
项目:goFitOne
阅读 24
收藏 0
点赞 0
评论 0
@Override
public Class<? extends Annotation> getScope() {
return ViewScoped.class;
}
ViewScopedContext.java 文件源码
项目:deltaspike
阅读 26
收藏 0
点赞 0
评论 0
/**
* {@inheritDoc}
*/
@Override
public Class<? extends Annotation> getScope()
{
return ViewScoped.class;
}