theKeys[arrayIndex]=Integer.toString(arrayIndex);
arrayIndex++;
}
// Add StaticTextElement as workaround for non translated label
uifactory.addStaticTextElement("customField_label" + customFieldIndex, null, customField.getName(), formLayout);//null > no label
SingleSelection selectionElement = uifactory.addDropdownSingleselect("customField_" + customFieldIndex, null, formLayout, theKeys, theValues, null);
if (project.getCustomFieldValue(customFieldIndex) != null && !project.getCustomFieldValue(customFieldIndex).equals("")) {
if (valueList.contains(project.getCustomFieldValue(customFieldIndex))) {
String key = Integer.toString(valueList.indexOf(project.getCustomFieldValue(customFieldIndex)) + 1);// '+1' because no-selection at the beginning
selectionElement.select(key, true);
} else {
this.showInfo("warn.customfield.key.does.not.exist",project.getCustomFieldValue(customFieldIndex));
}
}
customfieldElementList.add(selectionElement);