}
public void processRender(WebuiRequestContext context) throws Exception
{
context.getJavascriptManager().addJavascript("eXo.webui.UICombobox.init('" + getId() + "');");
Writer w = context.getWriter();
String options = "[";
String text =
"<div class='UIComboboxComponent'><div class='UIComboboxList'><div class='UIComboboxContainer'><div class='UIComboboxItemContainer'>";
for (SelectItemOption item : options_)
{
options += "'" + item.getLabel() + "',";
text +=
"<a href='javascript:void(0);' onclick='eXo.webui.UICombobox.getValue(this);' value='" + item.getValue()
+ "' class='UIComboboxItem'>";
text += "<div class='UIComboboxIcon'>";
text += "<div class='UIComboboxLabel'>" + item.getLabel() + "</div>";
text += "</div>";
text += "</a>";
}
text += "</div></div></div>";
options = options.substring(0, options.length() - 1) + "]";
text += "<input type='hidden' name='" + getName() + "' id='" + getId() + "'";
if (value_ != null && value_.trim().length() > 0)
{
text += " value='" + encodeValue(value_).toString() + "'";
}
text += " />";
text +=
"<input class='UIComboboxInput' options=\"" + options
+ "\" onkeyup='eXo.webui.UICombobox.complete(this,event);' type='text' " + renderJsActions();
if(value_ != null && value_.trim().length() > 0)
{
text += "value='" + encodeValue(value_).toString() + "'";
}
text += " /></div>";
w.write(text);
}