Erweiterungen
This commit is contained in:
@@ -2,14 +2,15 @@ package util;
|
||||
|
||||
import com.vaadin.flow.server.WrappedSession;
|
||||
|
||||
|
||||
public class Util {
|
||||
public static String getSessionAttributeWithDefault(WrappedSession currentSession, String key, String defaultValue) {
|
||||
public static String getSessionAttributeWithDefault(WrappedSession currentSession, String key,
|
||||
String defaultValue) {
|
||||
var result = defaultValue;
|
||||
|
||||
try {
|
||||
result = currentSession.getAttribute(key).toString();
|
||||
} catch (Exception e) {}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user