Search in sources :

Example 1 with GetAdminLevels

use of org.activityinfo.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class AdminLevelPanel method setIndicators.

public void setIndicators(Collection<Integer> indicatorIds) {
    showLoading();
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(Sets.newHashSet(indicatorIds));
    dispatcher.execute(query, new AsyncCallback<AdminLevelResult>() {

        @Override
        public void onFailure(Throwable caught) {
            showLoadingFailed();
        }

        @Override
        public void onSuccess(AdminLevelResult result) {
            showOptions(result.getData());
        }
    });
}
Also used : AdminLevelResult(org.activityinfo.shared.command.result.AdminLevelResult) GetAdminLevels(org.activityinfo.shared.command.GetAdminLevels)

Example 2 with GetAdminLevels

use of org.activityinfo.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class GetAdminLevelsHandlerTest method test.

@Test
public void test() {
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(Sets.newHashSet(1));
    AdminLevelResult result = execute(query);
    System.out.println(result.getData());
}
Also used : AdminLevelResult(org.activityinfo.shared.command.result.AdminLevelResult) GetAdminLevels(org.activityinfo.shared.command.GetAdminLevels) Test(org.junit.Test)

Aggregations

GetAdminLevels (org.activityinfo.shared.command.GetAdminLevels)2 AdminLevelResult (org.activityinfo.shared.command.result.AdminLevelResult)2 Test (org.junit.Test)1