Author: bibryam
Date: Thu Apr 22 07:42:10 2010
New Revision: 936635
URL:
http://svn.apache.org/viewvc?rev=936635&view=revLog:
A better query for autocompleter descriptions
Modified:
ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy
Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy?rev=936635&r1=936634&r2=936635&view=diff==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy Thu Apr 22 07:42:10 2010
@@ -50,7 +50,8 @@ if (searchFields && fieldValue) {
}
searchFieldsList.each { fieldName ->
if ("EQUALS".equals(searchType)) {
- andExprs.add(EntityCondition.makeCondition(EntityFieldValue.makeFieldValue(fieldName), EntityOperator.EQUALS, searchValue));
+ andExprs.add(EntityCondition.makeCondition(EntityFieldValue.makeFieldValue(returnField), EntityOperator.EQUALS, searchValue));
+ return;//in case of EQUALS, we search only a match for the returned field
} else {
andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER(EntityFieldValue.makeFieldValue(fieldName)), EntityOperator.LIKE, searchValue));
}