}
@Override
public void renderInput(HtmlWriter writer, ControlInfo ci)
{
HtmlTag input = writer.startTag("input");
input.addAttribute("type", "text");
input.addAttribute("id", ci.getId());
input.addAttribute("class", ci.getCssClass());
input.addAttribute("style", ci.getCssStyle());
if (ci.getDisabled()==false)
{ // Name of the field
input.addAttribute("name", ci.getName());
// Get Max Length
int maxLength = getMaxInputLength(ci.getColumn());
if (maxLength>0)
{
input.addAttribute("maxlength", maxLength);
input.addAttribute("size", String.valueOf(Math.min(maxLength, ci.getHSize())));
}
}
else
{ // Disabled text control
input.addAttribute("disabled");
// Get Max Length
int maxLength = getMaxInputLength(ci.getColumn());
if (maxLength>0)
{
input.addAttribute("size", String.valueOf(Math.min(maxLength, ci.getHSize())));
}
}
// Value
input.addAttribute("value", formatValue(ci, ci.getDisabled()));
// Event Attributes
input.addAttribute("onclick", ci.getOnclick());
input.addAttribute("onchange", ci.getOnchange());
input.addAttribute("onfocus", ci.getOnfocus());
input.addAttribute("onblur", ci.getOnblur());
input.endTag();
// Add Unit
if (ci.getDisabled()==false)
{
String unit = getUnitString(ci);
if (unit != null)