コード例 #1
0
  @Override
  public boolean isCommitted() {
    if (_lifecycle.equals(PortletRequest.RENDER_PHASE)
        || _lifecycle.equals(PortletRequest.RESOURCE_PHASE)) {

      MimeResponse mimeResponse = _getMimeResponse();

      return mimeResponse.isCommitted();
    } else if (!_include) {
      return false;
    } else {
      return true;
    }
  }
コード例 #2
0
  /**
   * @see {@link ExternalContext#isResponseCommitted()}
   * @since JSF 2.0
   */
  @Override
  public boolean isResponseCommitted() {

    if (portletResponse instanceof MimeResponse) {
      MimeResponse mimeResponse = (MimeResponse) portletResponse;
      boolean responseCommitted = mimeResponse.isCommitted();

      if (manageIncongruities) {
        incongruityContext.setResponseCommitted(responseCommitted);
      }

      return responseCommitted;
    } else {

      if (manageIncongruities) {
        return incongruityContext.isResponseCommitted();
      } else {
        throw new IllegalStateException();
      }
    }
  }