diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-12 18:48:51 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-12 18:48:51 +1200 |
commit | 891abffcf8c76fff62b2c4a35a41818d3eab6bc2 (patch) | |
tree | a82c7cfb1942d6883d3cac0ead01dcd0c0c490fc /src/org/traccar/web/client/controller/DeviceController.java | |
parent | f97b868dc1bbf9698d05a9473da6ddd0c01640e8 (diff) | |
parent | 58a5627460c73d954cc9928b3df30827698638f6 (diff) | |
download | trackermap-web-891abffcf8c76fff62b2c4a35a41818d3eab6bc2.tar.gz trackermap-web-891abffcf8c76fff62b2c4a35a41818d3eab6bc2.tar.bz2 trackermap-web-891abffcf8c76fff62b2c4a35a41818d3eab6bc2.zip |
Merge pull request #161 from khfayzullaev/patch-2
Prevent adding devices with same ids
Diffstat (limited to 'src/org/traccar/web/client/controller/DeviceController.java')
-rw-r--r-- | src/org/traccar/web/client/controller/DeviceController.java | 9 |
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(); |