From 6ddad848d942a4240ed2391fc62a860f9195ff32 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 13 Jan 2016 13:08:49 +0100 Subject: [client] fix LectureWizard not accepting "Done" when no locations are selected * removed the test code for the location cache, activated the real call * not showing the LocationSelectionPage if no locations are returned from the cache --- .../openslx/dozmod/thrift/cache/MetaDataCache.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/thrift') diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/cache/MetaDataCache.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/cache/MetaDataCache.java index 6c3d2be5..f7ed44e3 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/cache/MetaDataCache.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/cache/MetaDataCache.java @@ -1,6 +1,5 @@ package org.openslx.dozmod.thrift.cache; -import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; @@ -51,19 +50,20 @@ public class MetaDataCache { CACHE_TIME_MS) { @Override protected List update() throws TException { - List testLocationList = new ArrayList(); - testLocationList.add(new Location(1, "RZ - Raum 100")); - testLocationList.add(new Location(2, "RZ - Raum 101")); - testLocationList.add(new Location(3, "RZ - Raum 113")); - testLocationList.add(new Location(4, "RZ - Raum 114")); - return testLocationList; // enable this code when the server call is implemented -// try { -// return ThriftManager.getSatClient().getLocations(); -// } catch (TException e) { -// LOGGER.warn("Could not get location list from satellite, trying master for backup...", e); -// } -// return null; // HACK + try { + return ThriftManager.getSatClient().getLocations(); + } catch (TException e) { + LOGGER.warn("Could not get locations list from the satellite...", e); + } + // querying masterserver does not make sense for locations + return null; +// List testLocationList = new ArrayList(); +// testLocationList.add(new Location(1, "RZ - Raum 100")); +// testLocationList.add(new Location(2, "RZ - Raum 101")); +// testLocationList.add(new Location(3, "RZ - Raum 113")); +// testLocationList.add(new Location(4, "RZ - Raum 114")); +// return testLocationList; } }; -- cgit v1.2.3-55-g7522