}
@Override
public void renderInput(HtmlWriter writer, ControlInfo ci)
{
HtmlTag input = writer.startTag("textarea");
input.addAttribute("id", ci.getId());
input.addAttribute("class", ci.getCssClass());
input.addAttribute("style", ci.getCssStyle());
input.addAttribute("name", ci.getName());
input.addAttribute("disabled", ci.getDisabled());
input.addAttribute("rows", Math.max(ci.getVSize(), 2));
input.addAttribute("cols", Math.max(ci.getHSize(), 1));
// maxlength
if (ci.getDisabled()==false)
{ // Get Max Length
String checklength = getFormatOption(ci, "maxlength:");
if (StringUtils.isValid(checklength))
{ // Do lengthcheck via onKeyPress and onKeyUp Events
int maxLength = (int)ci.getColumn().getSize();
checklength = StringUtils.replace(checklength, "{0}", String.valueOf(maxLength));
input.addAttribute("onkeypress", checklength);
input.addAttribute("onkeyup", checklength);
}
}
// Event Attributes
input.addAttribute("onclick", ci.getOnclick());
input.addAttribute("onchange", ci.getOnchange());
input.addAttribute("onfocus", ci.getOnfocus());
input.addAttribute("onblur", ci.getOnblur());
// Body
String value = StringUtils.toString(ci.getValue());
value = StringEscapeUtils.escapeHtml(value);
input.beginBody(value);
// End
input.endTag();
}