Commit f070af49 authored by Jasper Floor's avatar Jasper Floor

HSTCONFIGEDIT-203 for new sitemap items set the selected page design to the...

HSTCONFIGEDIT-203 for new sitemap items set the selected page design to the first item in the list - forward port of 202
parent 7fe36406
......@@ -272,14 +272,18 @@ public class DescriptionPicker extends Panel {
current = 0;
String selected = getDefaultModelObjectAsString();
if (selected != null) {
int cnt = 0;
for (Descriptive descriptive : descriptives) {
final String name = getName(descriptive);
if (selected.equals(name)) {
current = cnt;
break;
if (StringUtils.isEmpty(selected)) {
setDefaultModelObjectByCurrentSelection();
} else {
int cnt = 0;
for (Descriptive descriptive : descriptives) {
final String name = getName(descriptive);
if (selected.equals(name)) {
current = cnt;
break;
}
cnt++;
}
cnt++;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment