Пример #1
0
  public void render(FacesContext context) throws FacesException {
    if (context.getResponseComplete()) return;

    Application app = context.getApplication();
    ViewHandler view = app.getViewHandler();

    beforePhase(context, PhaseId.RENDER_RESPONSE);

    try {
      if (log.isLoggable(Level.FINER)) log.finer(context.getViewRoot() + " before render view");

      view.renderView(context, context.getViewRoot());
    } catch (java.io.IOException e) {
      if (sendError(context, "renderView", e)) return;

      throw new FacesException(e);
    } catch (RuntimeException e) {
      if (sendError(context, "renderView", e)) return;

      throw e;
    } finally {
      afterPhase(context, PhaseId.RENDER_RESPONSE);

      logMessages(context);
    }
  }