mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user