use of org.activityinfo.legacy.shared.model.ActivityDTO in project activityinfo by bedatadriven.
the class SiteGridPanel method updateHeading.
private void updateHeading(final Filter filter) {
setHeadingText(I18N.CONSTANTS.sitesHeader());
dispatcher.execute(new GetSchema(), new AsyncCallback<SchemaDTO>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(SchemaDTO result) {
if (filter.isDimensionRestrictedToSingleCategory(DimensionType.Activity)) {
int activityId = filter.getRestrictedCategory(DimensionType.Activity);
ActivityDTO activity = result.getActivityById(activityId);
setHeadingText(activity.getDatabaseName() + " - " + activity.getName());
} else if (filter.isDimensionRestrictedToSingleCategory(DimensionType.Database)) {
int databaseId = filter.getRestrictedCategory(DimensionType.Database);
UserDatabaseDTO db = result.getDatabaseById(databaseId);
setHeadingText(db.getName());
}
}
});
}
Aggregations