Fixes issue 24012: Query list widgets with boolean parameters works
authorAugusto Mauch <augusto.mauch@openbravo.com>
Thu, 06 Jun 2013 14:51:21 +0200
changeset 20516 2a1c35b2bb8b
parent 20515 d6594f0d34ff
child 20517 89b8a18aaa8d
Fixes issue 24012: Query list widgets with boolean parameters works

Before trying to convert a 'Y' or 'N' string to boolean in this line [1], check that the value is a string, because sometimes at that point the value attribute can already be a boolean.

[1] https://code.openbravo.com/erp/devel/pi/file/4cd557c40816/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java#l221
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Fri Jun 07 09:28:08 2013 +0200
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Thu Jun 06 14:51:21 2013 +0200
@@ -218,7 +218,9 @@
               }
 
               if (domainType instanceof BooleanDomainType) {
-                value = ((PrimitiveDomainType) domainType).createFromString((String) value);
+                if (value instanceof String) {
+                  value = ((PrimitiveDomainType) domainType).createFromString((String) value);
+                }
               }
 
               if (!isExport) {