* nessecary javascripts
*/
@Override
public String createHTML(ElementParameter elemParam) {
StringBuffer out = new StringBuffer();
LanguageHandler lang = LanguageHandler.getInstance();
String langID = elemParam.getLangId();
out.append("<select" + getMultiple() + getVisibleRows());
if (!"".equals(getStylesheet())) {
out.append(" class=\"" + getStylesheet() + "\" ");
}
out.append(" id=\"" + getName() + "\" ");
//scripts
for(ScriptBean vsBean : scripts.values()) {
out.append(vsBean.getScriptname()+"=\"" + vsBean.getScriptvalue() + "\" ");
}
out.append("> ");
out.append(nl);
String listOptionString = "";
if (null != lang.getNoMatchFoundMessage()) {
Object obj = elemParam.getFetch().getTreeMap().get(this.name);
ArrayList<String> valueArrList = new ArrayList<String>();
String[] valueArr = null;
//check if obj is an array, that is, if more than one value is chosen in the multiselect
if(obj != null && obj.getClass().isArray()){
valueArr = (String[]) elemParam.getFetch().getTreeMap().get(this.name);
for(int i=0; i<valueArr.length; i++){
valueArrList.add(valueArr[i]);
}
listOptionString = lang.getIntervalListTranslationValue(langID, getListBoxId()
+ "_L", elemParam.getCalendar(), elemParam
.getUser().getListboxmode(), valueArrList);
}else{
listOptionString = lang.getIntervalListTranslationValue(langID, getListBoxId()
+ "_L", elemParam.getCalendar(), elemParam
.getUser().getListboxmode(), elemParam
.getFetch().getValueAsString(this.name));
}
// only write to out if we have option rows...
if(!lang.getNoMatchFoundMessage().equals(listOptionString)){
out.append(listOptionString);
}
}
out.append("</select>");
if (mandatory) {