diff --git a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java index 181c06f19b..83f9dd9130 100644 --- a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java +++ b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java @@ -1340,7 +1340,18 @@ public class AdvancedSearchBean } else { - this.customProperties.put(qname, search.getAttributeQuery(QName.createQName(qname))); + // a default datatype may indicate either an attribute query, or if a Fixed Value + // is present then it's a LOV constraint with a value selected + Object value = search.getFixedValueQuery(QName.createQName(qname)); + if (value != null) + { + this.customProperties.put(UISearchCustomProperties.PREFIX_LOV_ITEM + qname, value); + this.customProperties.put(qname, Boolean.TRUE); + } + else + { + this.customProperties.put(qname, search.getAttributeQuery(QName.createQName(qname))); + } this.panels.put(PANEL_CUSTOM, true); } } diff --git a/source/java/org/alfresco/web/ui/repo/component/UISearchCustomProperties.java b/source/java/org/alfresco/web/ui/repo/component/UISearchCustomProperties.java index 7a75934330..657d764cb7 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UISearchCustomProperties.java +++ b/source/java/org/alfresco/web/ui/repo/component/UISearchCustomProperties.java @@ -412,7 +412,7 @@ public class UISearchCustomProperties extends SelfRenderingComponent implements UISelectItems itemsComponent = (UISelectItems)facesApp. createComponent(ComponentConstants.JAVAX_FACES_SELECT_ITEMS); - List items = new ArrayList(3); + List items = new ArrayList(); List values = constraint.getAllowedValues(); for (String value : values) {