}
String s = (viewData != null) ? viewData.getCurrentValue() : value;
if (s != null && s.trim().length() > 0) {
// If the value comes from the user, escape it to avoid XSS attacks.
SafeHtml safeValue = SafeHtmlUtils.fromString(value);
// Use the template to create the Cell's html.
SafeHtml rendered = textAreaTemplate.textarea(safeValue, "", Integer.toString(rows), Integer.toString(cols));
sb.append(rendered);
} else {
// Add the placeholder helper text.
String placeholderText = GuidedDecisionTableConstants.INSTANCE.InsertYourCommentsHere();
String placeholderHtml = SafeHtmlUtils.htmlEscape(placeholderText);
// Create an empty text area.
SafeHtml rendered = textAreaTemplate.textareaEmpty("", Integer.toString(rows), Integer.toString(cols), placeholderHtml);
sb.append(rendered);
}
}