Skip to content

Commit

Permalink
ExtJsUtils升级支持ext6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix committed Aug 13, 2015
1 parent f712b7d commit bd12baa
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/main/java/edu/scup/web/util/ext/ExtJsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ public static List<SearchFilter> getFilters(HttpServletRequest request) {
logger.error("", e);
}
for (Map map : list) {
if ("list".equals(map.get("type"))) {
List value = (List) map.get("value");
String field = map.get("field").toString();
SearchFilter filter = new SearchFilter(field, SearchFilter.Operator.IN, value);
filters.add(filter);
} else if ("string".equals(map.get("type"))) {
String value = (String) map.get("value");
String field = map.get("field").toString();
SearchFilter filter = new SearchFilter(field, SearchFilter.Operator.LIKE, value);
try {
SearchFilter.Operator operator = SearchFilter.Operator.valueOf(map.get("operator").toString().toUpperCase());
SearchFilter filter = new SearchFilter(map.get("property").toString(), operator, map.get("value"));
filters.add(filter);
} catch (IllegalArgumentException e) {
logger.error("", e);
}
}
return filters;
Expand Down

0 comments on commit bd12baa

Please sign in to comment.