Search in sources :

Example 1 with Created

use of org.activityinfo.client.dispatch.callback.Created in project activityinfo by bedatadriven.

the class DbListPresenter method save.

/**
 * Package visible for testing *
 */
void save(UserDatabaseDTO db, final FormDialogTether dialog) {
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("name", db.getName());
    properties.put("fullName", db.getFullName());
    properties.put("countryId", db.getCountry().getId());
    dispatcher.execute(new CreateEntity("UserDatabase", properties), dialog, new Created() {

        @Override
        public void created(int newId) {
            eventBus.fireEvent(AppEvents.SCHEMA_CHANGED);
            loader.load();
            dialog.hide();
        }
    });
}
Also used : CreateEntity(org.activityinfo.shared.command.CreateEntity) HashMap(java.util.HashMap) Created(org.activityinfo.client.dispatch.callback.Created)

Aggregations

HashMap (java.util.HashMap)1 Created (org.activityinfo.client.dispatch.callback.Created)1 CreateEntity (org.activityinfo.shared.command.CreateEntity)1