Пример #1
0
 /** @see javax.faces.context.PartialViewContext#getPartialResponseWriter() */
 @Override
 public PartialResponseWriter getPartialResponseWriter() {
   assertNotReleased();
   if (partialResponseWriter == null) {
     partialResponseWriter = new DelayedInitPartialResponseWriter(this);
   }
   return partialResponseWriter;
 }
Пример #2
0
  /** @see javax.faces.context.PartialViewContext#isExecuteAll() */
  @Override
  public boolean isExecuteAll() {

    assertNotReleased();
    String execute =
        ctx.getExternalContext().getRequestParameterMap().get(PARTIAL_EXECUTE_PARAM_NAME);
    return (ALL_PARTIAL_PHASE_CLIENT_IDS.equals(execute));
  }
Пример #3
0
  /** @see javax.faces.context.PartialViewContext#getRenderIds() */
  @Override
  public Collection<String> getRenderIds() {

    assertNotReleased();
    if (renderIds != null) {
      return renderIds;
    }
    renderIds = populatePhaseClientIds(PARTIAL_RENDER_PARAM_NAME);
    return renderIds;
  }
Пример #4
0
  /** @see javax.faces.context.PartialViewContext#isAjaxRequest() */
  @Override
  public boolean isAjaxRequest() {

    assertNotReleased();
    if (ajaxRequest == null) {
      ajaxRequest =
          "partial/ajax"
              .equals(ctx.getExternalContext().getRequestHeaderMap().get("Faces-Request"));
    }
    return ajaxRequest;
  }
Пример #5
0
  /** @see javax.faces.context.PartialViewContext#isRenderAll() */
  @Override
  public boolean isRenderAll() {

    assertNotReleased();
    if (renderAll == null) {
      String render =
          ctx.getExternalContext().getRequestParameterMap().get(PARTIAL_RENDER_PARAM_NAME);
      renderAll = (ALL_PARTIAL_PHASE_CLIENT_IDS.equals(render));
    }

    return renderAll;
  }
Пример #6
0
  /** @see javax.faces.context.PartialViewContext#isPartialRequest() */
  @Override
  public boolean isPartialRequest() {

    assertNotReleased();
    if (partialRequest == null) {
      partialRequest =
          isAjaxRequest()
              || "partial/process"
                  .equals(ctx.getExternalContext().getRequestHeaderMap().get("Faces-Request"));
    }
    return partialRequest;
  }
Пример #7
0
  /** @see javax.faces.context.PartialViewContext#getExecuteIds() */
  @Override
  public Collection<String> getExecuteIds() {

    assertNotReleased();
    if (executeIds != null) {
      return executeIds;
    }
    executeIds = populatePhaseClientIds(PARTIAL_EXECUTE_PARAM_NAME);

    // include the view parameter facet ID if there are other execute IDs
    // to process
    if (!executeIds.isEmpty()) {
      UIViewRoot root = ctx.getViewRoot();
      if (root.getFacetCount() > 0) {
        if (root.getFacet(UIViewRoot.METADATA_FACET_NAME) != null) {
          executeIds.add(0, UIViewRoot.METADATA_FACET_NAME);
        }
      }
    }
    return executeIds;
  }