aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/client/model')
-rw-r--r--src/org/traccar/web/client/model/BaseStoreHandlers.java58
-rw-r--r--src/org/traccar/web/client/model/DeviceProperties.java5
2 files changed, 63 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/model/BaseStoreHandlers.java b/src/org/traccar/web/client/model/BaseStoreHandlers.java
new file mode 100644
index 00000000..ed4e5419
--- /dev/null
+++ b/src/org/traccar/web/client/model/BaseStoreHandlers.java
@@ -0,0 +1,58 @@
+package org.traccar.web.client.model;
+
+import com.sencha.gxt.data.shared.event.StoreAddEvent;
+import com.sencha.gxt.data.shared.event.StoreClearEvent;
+import com.sencha.gxt.data.shared.event.StoreDataChangeEvent;
+import com.sencha.gxt.data.shared.event.StoreFilterEvent;
+import com.sencha.gxt.data.shared.event.StoreHandlers;
+import com.sencha.gxt.data.shared.event.StoreRecordChangeEvent;
+import com.sencha.gxt.data.shared.event.StoreRemoveEvent;
+import com.sencha.gxt.data.shared.event.StoreSortEvent;
+import com.sencha.gxt.data.shared.event.StoreUpdateEvent;
+
+public class BaseStoreHandlers<T> implements StoreHandlers<T> {
+
+ @Override
+ public void onAdd(StoreAddEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onRemove(StoreRemoveEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onFilter(StoreFilterEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onClear(StoreClearEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onUpdate(StoreUpdateEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onDataChange(StoreDataChangeEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onRecordChange(StoreRecordChangeEvent<T> event) {
+ onAnything();
+ }
+
+ @Override
+ public void onSort(StoreSortEvent<T> event) {
+ onAnything();
+ }
+
+ public void onAnything() {
+ }
+
+}
diff --git a/src/org/traccar/web/client/model/DeviceProperties.java b/src/org/traccar/web/client/model/DeviceProperties.java
index 2c56ff6d..2ba4d47f 100644
--- a/src/org/traccar/web/client/model/DeviceProperties.java
+++ b/src/org/traccar/web/client/model/DeviceProperties.java
@@ -2,7 +2,9 @@ package org.traccar.web.client.model;
import org.traccar.web.shared.model.Device;
+import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.core.client.ValueProvider;
+import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
@@ -14,4 +16,7 @@ public interface DeviceProperties extends PropertyAccess<Device> {
ValueProvider<Device, String> name();
+ @Path("name")
+ LabelProvider<Device> label();
+
}