updating comment in select list generator as now sorting all lists, even hard-coded ones in edit configuration template
This commit is contained in:
parent
cf31ff4548
commit
6c9f87b163
2 changed files with 2 additions and 5 deletions
|
@ -64,7 +64,7 @@ public class SelectListGeneratorVTwo {
|
||||||
FieldVTwo.OptionsType optionsType = field.getOptionsType();
|
FieldVTwo.OptionsType optionsType = field.getOptionsType();
|
||||||
String vclassUri = null;
|
String vclassUri = null;
|
||||||
switch (optionsType){
|
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();
|
List<List<String>> hardcodedLiteralOptions = field.getLiteralOptions();
|
||||||
if (hardcodedLiteralOptions==null) {
|
if (hardcodedLiteralOptions==null) {
|
||||||
log.error("no literalOptions List found for field \""+fieldName+"\" in SelectListGenerator.getOptions() when OptionsType HARDCODED_LITERALS specified");
|
log.error("no literalOptions List found for field \""+fieldName+"\" in SelectListGenerator.getOptions() when OptionsType HARDCODED_LITERALS specified");
|
||||||
|
|
|
@ -104,10 +104,7 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Map<String, String> optionsMap = SelectListGeneratorVTwo.getOptions(editConfig, fieldName, wdf);
|
Map<String, String> optionsMap = SelectListGeneratorVTwo.getOptions(editConfig, fieldName, wdf);
|
||||||
//Sort options map if not hardcoded literals
|
optionsMap = SelectListGeneratorVTwo.getSortedMap(optionsMap);
|
||||||
if(field.getOptionsType()!=FieldVTwo.OptionsType.HARDCODED_LITERALS) {
|
|
||||||
optionsMap = SelectListGeneratorVTwo.getSortedMap(optionsMap);
|
|
||||||
}
|
|
||||||
pageData.put(fieldName, optionsMap);
|
pageData.put(fieldName, optionsMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue