}
}
// sort after the values
ArrayHelper.sort(attrKeys, guiTranslatedAttKeys, false, true, true);
// use this sorted keys-values
SingleSelection attribute = uifactory.addDropdownSingleselect(PRE_ATTRIBUTE + rowCreationCounter, null, flc, attrKeys, guiTranslatedAttKeys, null);
attribute.setUserObject(Integer.valueOf(rowPos));
attribute.addActionListener(this, FormEvent.ONCHANGE);
columnAttribute.add(rowPos, attribute.getName());
// 2b) Operator selector
String[] values = OperatorManager.getRegisteredAndAlreadyTranslatedOperatorLabels(getLocale(), operatorKeys);
FormItem operator = uifactory.addDropdownSingleselect(PRE_OPERATOR + rowCreationCounter, null, flc, operatorKeys, values, null);
operator.setUserObject(Integer.valueOf(rowPos));
columnOperator.add(rowPos, operator.getName());
// 2c) Attribute value - can be either a text input field or a selection
// drop down box - create both and hide the selection box
//
TextElement valuetxt = uifactory.addTextElement(PRE_VALUE_TEXT + rowCreationCounter, null, -1, null, flc);
valuetxt.setDisplaySize(25);
valuetxt.setNotEmptyCheck("form.easy.error.attribute");
valuetxt.setUserObject(Integer.valueOf(rowPos));
columnValueText.add(rowPos, valuetxt.getName());
// now the selection box
FormItem iselect = uifactory.addDropdownSingleselect(PRE_VALUE_SELECTION + rowCreationCounter, null, flc, new String[0], new String[0], null);
iselect.setUserObject(Integer.valueOf(rowPos));
iselect.setVisible(false);
columnValueSelection.add(rowPos, iselect.getName());
// 3) Init values for this row, assume selection of attribute at position 0
updateValueElementForAttribute(attribute.getKey(0), rowPos, null);
// 4) Add the 'add' and 'remove' buttons
FormLinkImpl addL = new FormLinkImpl("add_" + rowCreationCounter, "add." + rowPos, "+", Link.BUTTON_SMALL + Link.NONTRANSLATED);
addL.setUserObject(Integer.valueOf(rowPos));
flc.add(addL);