public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
    super.encodeBegin(facesContext, uiComponent);
    DomBasicRenderer.validateParameters(facesContext, uiComponent, UIInput.class);

    KindEditor ke = (KindEditor) uiComponent;

    ResponseWriter writer = facesContext.getResponseWriter();
    //    String clientId =ke.getId();
    String clientId = uiComponent.getClientId(facesContext);

    writer.startElement(HTML.TEXTAREA_ELEM, uiComponent);
    writer.writeAttribute(HTML.ID_ATTR, clientId, null);
    writer.writeAttribute(HTML.NAME_ATTR, clientId, null);

    renderHtmlAttributes(facesContext, writer, uiComponent);
    PassThruAttributeWriter.renderBooleanAttributes(
        writer, uiComponent, PassThruAttributeWriter.EMPTY_STRING_ARRAY);

    Object styleClass = uiComponent.getAttributes().get("styleClass");
    if (styleClass != null) {
      writer.writeAttribute(HTML.CLASS_ATTR, styleClass, null);
    }

    renderNumericAttributeOrDefault(writer, uiComponent, HTML.ROWS_ATTR, "2");
    renderNumericAttributeOrDefault(writer, uiComponent, HTML.COLS_ATTR, "20");

    writer.writeAttribute(HTML.STYLE_ATTR, "display:none;", null);
  }
  public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {
    // it must call the super.encode to support effects and facesMessage recovery
    super.encodeEnd(facesContext, uiComponent);
    ResponseWriter writer = facesContext.getResponseWriter();

    String currentValue = getValue(facesContext, uiComponent);
    if (currentValue != null && currentValue.length() > 0) {
      writer.write(DOMUtils.escapeAnsi(currentValue));
    }

    writer.endElement(HTML.TEXTAREA_ELEM);

    renderKindEditorJavascipt(facesContext, uiComponent);
  }
 public void encodeChildren(FacesContext facesContext, UIComponent uiComponent)
     throws IOException {
   super.encodeChildren(facesContext, uiComponent);
   DomBasicRenderer.validateParameters(facesContext, uiComponent, UIInput.class);
 }