updating comment in select list generator as now sorting all lists, even hard-coded ones in edit configuration template

This commit is contained in:
hjkhjk54 2011-12-08 22:19:00 +00:00
parent cf31ff4548
commit 6c9f87b163
2 changed files with 2 additions and 5 deletions

View file

@ -64,7 +64,7 @@ public class SelectListGeneratorVTwo {
FieldVTwo.OptionsType optionsType = field.getOptionsType();
String vclassUri = null;
switch (optionsType){
case HARDCODED_LITERALS: // not auto-sorted, and empty values not removed or replaced
case HARDCODED_LITERALS: // originally not auto-sorted but sorted now, and empty values not removed or replaced
List<List<String>> hardcodedLiteralOptions = field.getLiteralOptions();
if (hardcodedLiteralOptions==null) {
log.error("no literalOptions List found for field \""+fieldName+"\" in SelectListGenerator.getOptions() when OptionsType HARDCODED_LITERALS specified");

View file

@ -104,10 +104,7 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
continue;
}
Map<String, String> optionsMap = SelectListGeneratorVTwo.getOptions(editConfig, fieldName, wdf);
//Sort options map if not hardcoded literals
if(field.getOptionsType()!=FieldVTwo.OptionsType.HARDCODED_LITERALS) {
optionsMap = SelectListGeneratorVTwo.getSortedMap(optionsMap);
}
optionsMap = SelectListGeneratorVTwo.getSortedMap(optionsMap);
pageData.put(fieldName, optionsMap);
}
}