Merged V2.1 to HEAD

6590: AWC-1530 Saved search does not work for custom properties of type d:text with list constraint


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6629 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-08-29 14:46:58 +00:00
parent 4ba65b9950
commit cac4f143bd
2 changed files with 13 additions and 2 deletions

View File

@@ -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);
}
}

View File

@@ -412,7 +412,7 @@ public class UISearchCustomProperties extends SelfRenderingComponent implements
UISelectItems itemsComponent = (UISelectItems)facesApp.
createComponent(ComponentConstants.JAVAX_FACES_SELECT_ITEMS);
List<SelectItem> items = new ArrayList<SelectItem>(3);
List<SelectItem> items = new ArrayList<SelectItem>();
List<String> values = constraint.getAllowedValues();
for (String value : values)
{