Search in sources :

Example 1 with JsonTableUserFilter

use of org.eclipse.scout.rt.ui.html.json.table.userfilter.JsonTableUserFilter in project scout.rt by eclipse.

the class JsonTable method filtersToJson.

protected JSONArray filtersToJson(Collection<IUserFilterState> filters) {
    JSONArray jsonFilters = new JSONArray();
    for (IUserFilterState filter : filters) {
        JsonTableUserFilter jsonFilter = (JsonTableUserFilter) MainJsonObjectFactory.get().createJsonObject(filter);
        jsonFilter.setJsonTable(this);
        if (jsonFilter.isValid()) {
            jsonFilters.put(jsonFilter.toJson());
        } else {
            LOG.info("Filter is not valid, maybe column is invisible. {}", jsonFilter);
        }
    }
    return jsonFilters;
}
Also used : IUserFilterState(org.eclipse.scout.rt.client.ui.basic.userfilter.IUserFilterState) JSONArray(org.json.JSONArray) JsonTableUserFilter(org.eclipse.scout.rt.ui.html.json.table.userfilter.JsonTableUserFilter)

Aggregations

IUserFilterState (org.eclipse.scout.rt.client.ui.basic.userfilter.IUserFilterState)1 JsonTableUserFilter (org.eclipse.scout.rt.ui.html.json.table.userfilter.JsonTableUserFilter)1 JSONArray (org.json.JSONArray)1