aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/client/controller/DeviceController.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/controller/DeviceController.java b/src/org/traccar/web/client/controller/DeviceController.java
index 94c81ed3..b884537b 100644
--- a/src/org/traccar/web/client/controller/DeviceController.java
+++ b/src/org/traccar/web/client/controller/DeviceController.java
@@ -28,6 +28,7 @@ import com.google.gwt.core.client.GWT;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton;
+import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox;
import com.sencha.gxt.widget.core.client.event.HideEvent;
@@ -84,6 +85,10 @@ public class DeviceController implements ContentController, DeviceView.DeviceHan
public void onSuccess(Device result) {
deviceStore.add(result);
}
+ @Override
+ public void onFailure(Throwable caught) {
+ new AlertMessageBox("Error", "Device with this Unique ID already exists").show();
+ }
});
}
}).show();
@@ -99,6 +104,10 @@ public class DeviceController implements ContentController, DeviceView.DeviceHan
public void onSuccess(Device result) {
deviceStore.update(result);
}
+ @Override
+ public void onFailure(Throwable caught) {
+ new AlertMessageBox("Error", "Device with this Unique ID already exists").show();
+ }
});
}
}).show();