return container;
}
private HtmlComponent getScript() {
HtmlScript script = new HtmlScript();
script.setContentType("text/javascript");
script.setConditional(true);
script.setScript("\n" + "function addTag(field, tag) {\n" + "var element = document.getElementById(field);\n"
+ "var tags = element.value;\n"
+ "if (!tags.match('^' + tag + '$|\\\\s' + tag + '\\\\s|\\\\s' + tag + '$')) {\n"
+ "if (tags.length > 0) {\n" + "element.value = tags + ' ' + tag;\n" + "}\n" + "else {\n"
+ "element.value = tag;\n" + "}\n" + "element.focus();\n" + "}\n" + "}\n");
return script;