javax.faces.lifecycle.Lifecycle.getPhaseListeners()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中javax.faces.lifecycle.Lifecycle.getPhaseListeners()方法的一些代码示例,展示了Lifecycle.getPhaseListeners()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lifecycle.getPhaseListeners()方法的具体详情如下:
包路径:javax.faces.lifecycle.Lifecycle
类名称:Lifecycle
方法名:getPhaseListeners

Lifecycle.getPhaseListeners介绍

[英]Return the set of registered PhaseListeners for this Lifecycle instance. If there are no registered listeners, a zero-length array is returned.
[中]返回此生命周期实例的已注册PhaseListener集。如果没有注册的侦听器,则返回零长度数组。

代码示例

代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-jsf-module-impl

@Override
public PhaseListener[] getPhaseListeners()
{
  return this.wrapped.getPhaseListeners();
}

代码示例来源:origin: org.apache.myfaces.extensions.cdi.bundles/myfaces-extcdi-bundle-jsf12

/**
 * {@inheritDoc}
 */
public PhaseListener[] getPhaseListeners()
{
  return this.wrapped.getPhaseListeners();
}

代码示例来源:origin: org.apache.myfaces.extensions.cdi.bundles/myfaces-extcdi-bundle-jsf20

/**
 * {@inheritDoc}
 */
public PhaseListener[] getPhaseListeners()
{
  return this.wrapped.getPhaseListeners();
}

代码示例来源:origin: org.apache.myfaces.extensions.cdi.bundles/myfaces-extcdi-bundle-jsf20

/**
 * {@inheritDoc}
 */
public PhaseListener[] getPhaseListeners()
{
  return wrapped.getPhaseListeners();
}

代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-jsf-module-impl-ee6

@Override
public PhaseListener[] getPhaseListeners()
{
  return this.wrapped.getPhaseListeners();
}

代码示例来源:origin: org.apache.myfaces.extensions.cdi.modules/myfaces-extcdi-jsf12-module-impl

/**
 * {@inheritDoc}
 */
public PhaseListener[] getPhaseListeners()
{
  return this.wrapped.getPhaseListeners();
}

代码示例来源:origin: org.springframework.webflow/org.springframework.faces

/**
 * Delegates to the wrapped {@link Lifecycle}.
 */
public PhaseListener[] getPhaseListeners() {
  return delegate.getPhaseListeners();
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

protected void processOutgoingPublicRenderParameters(Lifecycle lifecycle) {

    PhaseListener[] phaseListeners = lifecycle.getPhaseListeners();

    for (PhaseListener phaseListener : phaseListeners) {

      if (phaseListener instanceof IPCPhaseListener) {
        IPCPhaseListener ipcPhaseListener = (IPCPhaseListener) phaseListener;
        ipcPhaseListener.processOutgoingPublicRenderParameters(bridgeContext, facesContext);

        break;
      }
    }
  }
}

代码示例来源:origin: liferay/liferay-faces

protected void processOutgoingPublicRenderParameters(Lifecycle lifecycle) {

    PhaseListener[] phaseListeners = lifecycle.getPhaseListeners();

    for (PhaseListener phaseListener : phaseListeners) {

      if (phaseListener instanceof IPCPhaseListener) {
        IPCPhaseListener ipcPhaseListener = (IPCPhaseListener) phaseListener;
        ipcPhaseListener.processOutgoingPublicRenderParameters(bridgeContext, facesContext);

        break;
      }
    }
  }
}

代码示例来源:origin: javax/javaee-web-api

@Override
public PhaseListener[] getPhaseListeners() {
  return getWrapped().getPhaseListeners();
}

代码示例来源:origin: com.sun.faces/jsf-api

@Override
public PhaseListener[] getPhaseListeners() {
  return getWrapped().getPhaseListeners();
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

public PhaseListener[] getPhaseListeners()
{
  return getWrapped().getPhaseListeners();
}

代码示例来源:origin: org.springframework.webflow/spring-faces

public static void notifyAfterListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent afterPhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = (lifecycle.getPhaseListeners().length - 1); i >= 0; i--) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.afterPhase(afterPhaseEvent);
    }
  }
}

代码示例来源:origin: org.springframework.webflow/org.springframework.faces

public static void notifyAfterListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent afterPhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = 0; i < lifecycle.getPhaseListeners().length; i++) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.afterPhase(afterPhaseEvent);
    }
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public static void notifyBeforeListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent beforePhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = 0; i < lifecycle.getPhaseListeners().length; i++) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.beforePhase(beforePhaseEvent);
    }
  }
}

代码示例来源:origin: org.springframework.webflow/spring-faces

public static void notifyBeforeListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent beforePhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = 0; i < lifecycle.getPhaseListeners().length; i++) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.beforePhase(beforePhaseEvent);
    }
  }
}

代码示例来源:origin: spring-projects/spring-webflow

public static void notifyAfterListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent afterPhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = (lifecycle.getPhaseListeners().length - 1); i >= 0; i--) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.afterPhase(afterPhaseEvent);
    }
  }
}

代码示例来源:origin: org.springframework.webflow/org.springframework.faces

public static void notifyBeforeListeners(PhaseId phaseId, Lifecycle lifecycle, FacesContext context) {
  PhaseEvent beforePhaseEvent = new PhaseEvent(context, phaseId, lifecycle);
  for (int i = 0; i < lifecycle.getPhaseListeners().length; i++) {
    PhaseListener listener = lifecycle.getPhaseListeners()[i];
    if (listener.getPhaseId() == phaseId || listener.getPhaseId() == PhaseId.ANY_PHASE) {
      listener.beforePhase(beforePhaseEvent);
    }
  }
}

代码示例来源:origin: com.sun.faces/jsf-impl

public static void removeELResolverInitPhaseListener() {
  LifecycleFactory factory = (LifecycleFactory)
      FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
  // remove ourselves from the list of listeners maintained by
  // the lifecycle instances
  for (Iterator<String> i = factory.getLifecycleIds(); i.hasNext();) {
    Lifecycle lifecycle = factory.getLifecycle(i.next());
    for (PhaseListener cur : lifecycle.getPhaseListeners()) {
      if (cur instanceof ELResolverInitPhaseListener) {
        lifecycle.removePhaseListener(cur);
      }
    }
  }
}

代码示例来源:origin: org.glassfish/javax.faces

public static void removeELResolverInitPhaseListener() {
  LifecycleFactory factory = (LifecycleFactory)
      FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
  // remove ourselves from the list of listeners maintained by
  // the lifecycle instances
  for (Iterator<String> i = factory.getLifecycleIds(); i.hasNext();) {
    Lifecycle lifecycle = factory.getLifecycle(i.next());
    for (PhaseListener cur : lifecycle.getPhaseListeners()) {
      if (cur instanceof ELResolverInitPhaseListener) {
        lifecycle.removePhaseListener(cur);
      }
    }
  }
}

相关文章