@SuppressWarnings("unchecked")
ListLoader<ListLoadConfig, ListLoadResult<?>> l = (ListLoader<ListLoadConfig, ListLoadResult<?>>) loader;
// delay expanding - hide the empty list with shadow until something is loaded.
if (listView.getLoadingHtml() == null) {
final GroupingHandlerRegistration tmpHandler = new GroupingHandlerRegistration();
LoadHandler<ListLoadConfig, ListLoadResult<?>> loadHandler = new LoadHandler<ListLoadConfig, ListLoadResult<?>>() {
@Override
public void onLoad(LoadEvent<ListLoadConfig, ListLoadResult<?>> event) {
tmpHandler.removeHandler();
expand(context, parent, updater, value);
}
};
tmpHandler.add(l.addLoadHandler(loadHandler));
}
l.load(getParams(query));
}
} else {