Author: erwan
Date: Wed Feb 17 07:21:51 2010
New Revision: 910844
URL:
http://svn.apache.org/viewvc?rev=910844&view=revLog:
As spotted by Scott on the dev mailing list, removed a println and re-formatted a if statement
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=910844&r1=910843&r2=910844&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 Wed Feb 17 07:21:51 2010
@@ -43,17 +43,16 @@
displayFieldsSet.add(returnField); //add it to select fields, in case it is missing
context.returnField = returnField;
context.displayFieldsSet = displayFieldsSet;
- if("Y".equals(searchTypeStartWith.toUpperCase())){
- searchValue = fieldValue.toUpperCase() + "%";
- }
- else{
- searchValue = "%" + fieldValue.toUpperCase() + "%";
+ if ("Y".equals(searchTypeStartWith.toUpperCase())) {
+ searchValue = fieldValue.toUpperCase() + "%";
+ } else {
+ searchValue = "%" + fieldValue.toUpperCase() + "%";
}
searchFieldsList.each { fieldName ->
andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER(EntityFieldValue.makeFieldValue(fieldName)), EntityOperator.LIKE, searchValue));
}
}
-System.out.println(andExprs);
+
if (andExprs && entityName && displayFieldsSet) {
entityConditionList = EntityCondition.makeCondition(andExprs, EntityOperator.OR);