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

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

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

Lifecycle.execute介绍

[英]Execute all of the phases of the request processing lifecycle, up to but not including the Render Response phase, as described in the JavaServer Faces Specification, in the specified order. The processing flow can be affected (by the application, by components, or by event listeners) by calls to the renderResponse() or responseComplete() methods of the FacesContext instance associated with the current request.
[中]按照指定的顺序执行请求处理生命周期的所有阶段,直到但不包括Render Response阶段,如JavaServer Faces规范中所述。对与当前请求关联的FacesContext实例的renderResponse()responseComplete()方法的调用可能会影响处理流(由应用程序、组件或事件侦听器)。

代码示例

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

public void execute(FacesContext context) throws FacesException
{
  getWrapped().execute(context);
}

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

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: org.seasar.teeda/teeda-core

private void restoreView(FacesContext facesContext) {
  facesContext.renderResponse();
  // call restore phase only
  lifecycle.execute(facesContext);
}

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

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: javax.faces/javax.faces-api

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

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

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

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

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: org.apache.myfaces.extensions.scripting/extscript-core

public void execute(FacesContext facesContext) throws FacesException {
  weaveDelegate();
  _delegate.execute(facesContext);
}

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

public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: eclipse-ee4j/mojarra

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: eclipse-ee4j/mojarra

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

代码示例来源:origin: jboss/jboss-javaee-specs

@Override
public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

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

public void execute(FacesContext context) throws FacesException {
  getWrapped().execute(context);
}

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

/**
 * Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through
 * INVOKE_APPLICATION.
 */
public void processUserEvent() {
  FacesContext facesContext = FlowFacesContext.getCurrentInstance();
  // Must respect these flags in case user set them during RESTORE_VIEW phase
  if (!facesContext.getRenderResponse() && !facesContext.getResponseComplete()) {
    this.facesLifecycle.execute(facesContext);
  }
}

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

/**
 * Executes postback-processing portions of the standard JSF lifecycle including APPLY_REQUEST_VALUES through
 * INVOKE_APPLICATION.
 */
public void processUserEvent() {
  FacesContext facesContext = FlowFacesContext.getCurrentInstance();
  // Must respect these flags in case user set them during RESTORE_VIEW phase
  if (!facesContext.getRenderResponse() && !facesContext.getResponseComplete()) {
    this.facesLifecycle.execute(facesContext);
  }
}

代码示例来源:origin: frenchc/jetm

@Override
public void execute(FacesContext context) throws FacesException {
 EtmPoint requestPoint = EtmManager.getEtmMonitor().createPoint(getDefaultRequestName(context));
 context.getAttributes().put(EtmJsfPlugin.ROOT_ETM_POINT, requestPoint);
 delegate.execute(context);
}

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

/**
 * Broadcasts {@link org.apache.myfaces.extensions.cdi.core.api.startup.event.StartupEvent} and
 * {@link org.apache.myfaces.extensions.cdi.jsf.api.listener.request.BeforeFacesRequest} btw.
 * {@link org.apache.myfaces.extensions.cdi.jsf.api.listener.request.AfterFacesRequest}
 * <p/>
 * {@inheritDoc}
 */
public void execute(FacesContext facesContext)
{
  broadcastApplicationStartupBroadcaster();
  broadcastBeforeFacesRequestEvent(facesContext);
  WindowHandler windowHandler = CodiUtils.getContextualReferenceByClass(WindowHandler.class);
  if (windowHandler instanceof LifecycleAwareWindowHandler)
  {
    ((LifecycleAwareWindowHandler) windowHandler).beforeLifecycleExecute(facesContext);
    if (facesContext.getResponseComplete())
    {
      // no further processing
      return;
    }
  }
  wrapped.execute(facesContext);
}

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

/**
 * Broadcasts {@link org.apache.myfaces.extensions.cdi.core.api.startup.event.StartupEvent} and
 * {@link org.apache.myfaces.extensions.cdi.jsf.api.listener.request.BeforeFacesRequest} btw.
 * {@link org.apache.myfaces.extensions.cdi.jsf.api.listener.request.AfterFacesRequest}
 * <p/>
 * {@inheritDoc}
 */
public void execute(FacesContext facesContext)
{
  broadcastApplicationStartupBroadcaster();
  broadcastBeforeFacesRequestEvent(facesContext);
  WindowHandler windowHandler = CodiUtils.getContextualReferenceByClass(WindowHandler.class);
  if (windowHandler instanceof LifecycleAwareWindowHandler)
  {
    ((LifecycleAwareWindowHandler) windowHandler).beforeLifecycleExecute(facesContext);
    if (facesContext.getResponseComplete())
    {
      // no further processing
      return;
    }
  }
  wrapped.execute(facesContext);
}

代码示例来源:origin: philwebb/springfaces

private void render(FacesContext context, ViewArtifact viewArtifact, Map<String, Object> model) {
  ModelAndViewArtifact modelAndViewArtifact = new ModelAndViewArtifact(viewArtifact, model);
  if (this.rendering != null) {
    this.rendering = modelAndViewArtifact;
    ViewHandler viewHandler = this.facesContext.getApplication().getViewHandler();
    UIViewRoot viewRoot = viewHandler.createView(this.facesContext, viewArtifact.toString());
    this.facesContext.setViewRoot(viewRoot);
  } else {
    this.rendering = modelAndViewArtifact;
    try {
      Lifecycle lifecycle = this.lifecycleAccessor.getLifecycle();
      lifecycle.execute(context);
      lifecycle.render(context);
    } finally {
      this.rendering = null;
    }
  }
}

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

public void processUserEvent() {
  FacesContext facesContext = FlowFacesContext.newInstance(requestContext, facesLifecycle);
  facesContext.setViewRoot(viewRoot);
  try {
    if (restored && !facesContext.getRenderResponse() && !facesContext.getResponseComplete()) {
      facesLifecycle.execute(facesContext);
    }
    if (JsfUtils.isPortlet(facesContext)) {
      requestContext.getFlashScope().put(ViewRootHolder.VIEW_ROOT_HOLDER_KEY,
          new ViewRootHolder(getViewRoot()));
    }
  } finally {
    facesContext.release();
  }
}

相关文章