@Override
  public void encodeBegin(final FacesContext context, final UIComponent component)
      throws IOException {
    if (!component.isRendered()) {
      return;
    }

    final ResponseWriter writer = context.getResponseWriter();
    final HtmlWaitingPanel waitingPanel = (HtmlWaitingPanel) component;

    final String style = waitingPanel.getStyle();
    final String styleClass = waitingPanel.getStyleClass();

    writer.startElement(ELEMENT_DIV, component);

    this.writeIdAttribute(context, writer, component);

    if (StringUtils.isNotEmpty(style)) {
      writer.writeAttribute("style", style, null);
    }

    if (StringUtils.isNotEmpty(styleClass)) {
      writer.writeAttribute("class", "butter-component-waitingPanel " + styleClass, null);
    } else {
      writer.writeAttribute("class", "butter-component-waitingPanel", null);
    }
  }
Пример #2
0
 public String getModelUniqueIdentifier() {
   return StringUtils.getNotNullValue(getUniqueIdentifier(), getId());
 }