@Override
  protected void encodeZIndex(
      ResponseWriter responseWriter, OutputTooltip outputTooltip, Integer zIndex, boolean first)
      throws IOException {

    if (zIndex == Integer.MIN_VALUE) {
      encodeNonEscapedObject(
          responseWriter, Z_INDEX, AlloyRendererUtil.LIFERAY_Z_INDEX_TOOLTIP, first);
    } else {
      super.encodeZIndex(responseWriter, outputTooltip, zIndex, first);
    }
  }
  @Override
  public void encodeMarkupBegin(FacesContext facesContext, UIComponent uiComponent)
      throws IOException {

    ResponseWriter responseWriter = facesContext.getResponseWriter();
    OutputTooltipResponseWriter outputTooltipResponseWriter =
        new OutputTooltipResponseWriter(responseWriter, uiComponent);

    OutputTooltip outputTooltip = (OutputTooltip) uiComponent;

    if (outputTooltip.getFor() == null) {

      if (facesContext.isProjectStage(ProjectStage.Development)) {
        logger.error(
            "The outputTooltip needs to point to something. Try using its 'for' attribute to point to an 'id' in the component tree.");
      }
    }

    // Mojarra's HTML Basic calls encodeEnd for fun
    super.encodeMarkupEnd(facesContext, uiComponent, outputTooltipResponseWriter);
  }