diff options
author | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-08 16:48:32 -0400 |
---|---|---|
committer | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-08 16:48:32 -0400 |
commit | e4702bdae9f0618eab30f07ba5f7ab814cc08806 (patch) | |
tree | 256945ec71af295e783263672f960a5192c2bdce /src/org/traccar | |
parent | f97b868dc1bbf9698d05a9473da6ddd0c01640e8 (diff) | |
download | trackermap-web-e4702bdae9f0618eab30f07ba5f7ab814cc08806.tar.gz trackermap-web-e4702bdae9f0618eab30f07ba5f7ab814cc08806.tar.bz2 trackermap-web-e4702bdae9f0618eab30f07ba5f7ab814cc08806.zip |
Prevent adding devices with the equal Unique IDs
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/web/client/controller/DeviceController.java | 8 |
1 files changed, 8 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..95eb60d7 100644 --- a/src/org/traccar/web/client/controller/DeviceController.java +++ b/src/org/traccar/web/client/controller/DeviceController.java @@ -84,6 +84,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 +103,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(); |