details:   https://code.openbravo.com/erp/devel/pi/rev/d74946c3fc53
changeset: 13685:d74946c3fc53
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Fri Sep 09 13:13:10 2011 +0200
summary:   issue 17778: added some code corrections

diffstat:

 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
 |  14 +++++-----
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r e8725afe1d6a -r d74946c3fc53 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
--- 
a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
       Fri Sep 09 13:14:48 2011 +0200
+++ 
b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
       Fri Sep 09 13:13:10 2011 +0200
@@ -20,10 +20,8 @@
 
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -39,7 +37,6 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
-import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.service.datasource.DataSourceFilter;
 import org.openbravo.service.json.JsonConstants;
 import org.openbravo.service.json.JsonUtils;
@@ -105,19 +102,22 @@
     }
   }
 
+  /**
+   * This method verifies that in the parameters, there are not numeric or 
date values. In case that
+   * it finds numeric or date parameter, these are deleted
+   * 
+   * @author jecharri
+   */
   private void verifyPropertyTypes(Selector sel, Map<String, String> 
parameters) {
-    // TODO Auto-generated method stub
     String value = parameters.get("criteria");
     String filteredCriteria = "";
     String fieldName;
     Entity entity = ModelProvider.getInstance().getEntityByTableName(
         sel.getTable().getDBTableName());
     Entity cEntity = entity;
-    Iterator<Column> ci;
     try {
-      OBContext.setAdminMode();
+      OBContext.setAdminMode(true);
       if (value.contains(JsonConstants.IN_PARAMETER_SEPARATOR)) {
-        final List<String> values = new ArrayList<String>();
         final String[] separatedValues = 
value.split(JsonConstants.IN_PARAMETER_SEPARATOR);
         for (String separatedValue : separatedValues) {
           JSONObject jSONObject = new JSONObject(separatedValue);

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to