Author: mbrohl
Date: Thu May 28 16:28:17 2015
New Revision: 1682272
URL:
http://svn.apache.org/r1682272Log:
Manually applied patch from jira issue OFBIZ-6310: createConditionList doesn't handle widget dropdown multi-submitted values when called by performFind. Adds detection if the field value represents a collection and in this case sets EntityOperator.IN instead of EntityOperator.EQUALS.
Thanks Christian Carlow for reporting the issue and providing the patch.
Modified:
ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=1682272&r1=1682271&r2=1682272&view=diff==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Thu May 28 16:28:17 2015
@@ -330,7 +330,11 @@ public class FindServices {
fieldOp = entityOperators.get(operation);
}
} else {
- fieldOp = EntityOperator.EQUALS;
+ if(UtilValidate.isNotEmpty(UtilGenerics.toList(fieldValue))){
+ fieldOp = EntityOperator.IN;
+ } else {
+ fieldOp = EntityOperator.EQUALS;
+ }
}
Object fieldObject = fieldValue;
if ((fieldOp != EntityOperator.IN && fieldOp != EntityOperator.NOT_IN ) || !(fieldValue instanceof Collection<?>)) {