Search in sources :

Example 1 with Created

use of org.activityinfo.ui.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.legacy.shared.command.CreateEntity) HashMap(java.util.HashMap) SafeHtmlUtils.fromString(com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString) Created(org.activityinfo.ui.client.dispatch.callback.Created)

Aggregations

SafeHtmlUtils.fromString (com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString)1 HashMap (java.util.HashMap)1 CreateEntity (org.activityinfo.legacy.shared.command.CreateEntity)1 Created (org.activityinfo.ui.client.dispatch.callback.Created)1