Integrated code contribution from Michael Kiske - List of Values constraint support added to Advanced Search custom search properties

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5645 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-09 11:18:41 +00:00
parent e3029f8936
commit 0234890142
3 changed files with 137 additions and 23 deletions

View File

@@ -420,7 +420,7 @@ public class AdvancedSearchBean
}
/**
* @param modifiedDate The modifiedDateFrom to set.
* @param modifiedDate The modifiedDate to set.
*/
public void setModifiedDateFrom(Date modifiedDate)
{
@@ -858,11 +858,24 @@ public class AdvancedSearchBean
}
else if (value != null)
{
// by default use toString() value - this is for text fields and unknown types
String strVal = value.toString();
if (strVal != null && strVal.length() != 0)
Object item = this.customProperties.get(
UISearchCustomProperties.PREFIX_LOV_ITEM + qname);
if (item != null)
{
search.addAttributeQuery(QName.createQName(qname), strVal);
// ListOfValues
if (((Boolean)value) == true)
{
search.addFixedValueQuery(QName.createQName(qname), item.toString());
}
}
else
{
// by default use toString() value - this is for text fields and unknown types
String strVal = value.toString();
if (strVal != null && strVal.length() != 0)
{
search.addAttributeQuery(QName.createQName(qname), strVal);
}
}
}
}