Jeroen Hoffman pushed to branch release/3.0 at cms-community / 
hippo-addon-hst-configuration-editor


Commits:
f070af49 by Jasper Floor at 2016-10-07T15:35:48+02:00
HSTCONFIGEDIT-203 for new sitemap items set the selected page design to the 
first item in the list - forward port of 202

- - - - -
511e78ae by Jeroen Hoffman at 2016-10-13T14:28:52+02:00
HSTCONFIGEDIT-203 Reintegrate branch 'bugfix/HSTCONFIGEDIT-203' into 
release/3.0

- - - - -


1 changed file:

- 
frontend/src/main/java/org/hippoecm/hst/plugins/frontend/editor/description/DescriptionPicker.java


Changes:

=====================================
frontend/src/main/java/org/hippoecm/hst/plugins/frontend/editor/description/DescriptionPicker.java
=====================================
--- 
a/frontend/src/main/java/org/hippoecm/hst/plugins/frontend/editor/description/DescriptionPicker.java
+++ 
b/frontend/src/main/java/org/hippoecm/hst/plugins/frontend/editor/description/DescriptionPicker.java
@@ -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++;
             }
         }
     }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-hst-configuration-editor/compare/7fe364060fd25fd68bb96263bad0bd6094b46970...511e78ae8fb7c9c9da32c817e6f074d5585f059e
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to