use of org.eclipse.scout.rt.client.ui.basic.userfilter.IUserFilterState in project scout.rt by eclipse.
the class TableUserFilterManager method setSerializedData.
/**
* Import the serialized data, e.g. after restoring from a bookmark
*/
public void setSerializedData(byte[] data) {
try {
reset();
Collection<IUserFilterState> filterStates = SerializationUtility.createObjectSerializer().deserialize(data, null);
for (IUserFilterState filterState : filterStates) {
boolean success = filterState.notifyDeserialized(m_table);
if (success) {
addFilter(filterState);
} else {
LOG.info("User filter state of table '{}' cannot be deserialized because the column could not be found. Ignoring element.", m_table.getClass().getName());
}
}
} catch (IOException | ClassNotFoundException e) {
throw new ProcessingException("Failed reading user filter data.", e);
}
}
use of org.eclipse.scout.rt.client.ui.basic.userfilter.IUserFilterState in project scout.rt by eclipse.
the class TableUserFilterManager method removeFilterByKey.
public void removeFilterByKey(Object key) {
IUserFilterState filter = m_filterMap.remove(key);
fireFilterRemoved(filter);
LOG.info("Filter removed {}", filter);
}
use of org.eclipse.scout.rt.client.ui.basic.userfilter.IUserFilterState in project scout.rt by eclipse.
the class JsonTable method handleUiFilterAdded.
protected void handleUiFilterAdded(JsonEvent event) {
JSONObject data = event.getData();
IUserFilterState filterState = createFilterState(data);
TableEventFilterCondition condition = addTableEventFilterCondition(TableEvent.TYPE_USER_FILTER_ADDED);
condition.setUserFilter(filterState);
getModel().getUIFacade().fireFilterAddedFromUI(filterState);
}
Aggregations