Search in sources :

Example 1 with LocationDialog

use of org.activityinfo.client.page.entry.location.LocationDialog in project activityinfo by bedatadriven.

the class LocationSection method changeLocation.

private void changeLocation() {
    LocationDialog dialog = new LocationDialog(dispatcher, activity.getDatabase().getCountry(), activity.getLocationType());
    dialog.show(new Callback() {

        @Override
        public void onSelected(LocationDTO location, boolean isNew) {
            updateForm(location, isNew);
        }
    });
}
Also used : Callback(org.activityinfo.client.page.entry.location.LocationDialog.Callback) AsyncCallback(com.google.gwt.user.client.rpc.AsyncCallback) LocationDialog(org.activityinfo.client.page.entry.location.LocationDialog) LocationDTO(org.activityinfo.shared.dto.LocationDTO)

Example 2 with LocationDialog

use of org.activityinfo.client.page.entry.location.LocationDialog in project activityinfo by bedatadriven.

the class SiteDialogLauncher method chooseLocationThenAddSite.

private void chooseLocationThenAddSite(final ActivityDTO activity, final SiteDialogCallback callback) {
    LocationDialog dialog = new LocationDialog(dispatcher, activity.getDatabase().getCountry(), activity.getLocationType());
    dialog.show(new LocationDialog.Callback() {

        @Override
        public void onSelected(LocationDTO location, boolean isNew) {
            SiteDTO newSite = new SiteDTO();
            newSite.setActivityId(activity.getId());
            newSite.setLocation(location);
            SiteDialog dialog = new SiteDialog(dispatcher, activity);
            dialog.showNew(newSite, location, isNew, callback);
        }
    });
}
Also used : LocationDialog(org.activityinfo.client.page.entry.location.LocationDialog) SiteDTO(org.activityinfo.shared.dto.SiteDTO) LocationDTO(org.activityinfo.shared.dto.LocationDTO)

Aggregations

LocationDialog (org.activityinfo.client.page.entry.location.LocationDialog)2 LocationDTO (org.activityinfo.shared.dto.LocationDTO)2 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 Callback (org.activityinfo.client.page.entry.location.LocationDialog.Callback)1 SiteDTO (org.activityinfo.shared.dto.SiteDTO)1