Search in sources :

Example 91 with Preferences

use of org.olat.core.util.prefs.Preferences in project openolat by klemens.

the class MessageListController method saveViewSettings.

private void saveViewSettings(UserRequest ureq, String viewMode) {
    Preferences prefs = ureq.getUserSession().getGuiPreferences();
    prefs.putAndSave(GUI_PREFS_VIEWMODE_CLASS, GUI_PREFS_VIEWMODE_KEY, viewMode);
}
Also used : Preferences(org.olat.core.util.prefs.Preferences)

Example 92 with Preferences

use of org.olat.core.util.prefs.Preferences in project openolat by klemens.

the class MessageListController method getViewSettings.

private String getViewSettings(UserRequest ureq) {
    Preferences prefs = ureq.getUserSession().getGuiPreferences();
    Object setting = prefs.get(GUI_PREFS_VIEWMODE_CLASS, GUI_PREFS_VIEWMODE_KEY);
    if (VIEWMODE_THREAD.equals(setting) || VIEWMODE_FLAT.equals(setting) || VIEWMODE_MESSAGE.equals(setting)) {
        return (String) setting;
    }
    return VIEWMODE_THREAD;
}
Also used : Preferences(org.olat.core.util.prefs.Preferences)

Aggregations

Preferences (org.olat.core.util.prefs.Preferences)92 ArrayList (java.util.ArrayList)12 I18nModule (org.olat.core.util.i18n.I18nModule)8 WindowManager (org.olat.core.gui.WindowManager)6 ContextEntry (org.olat.core.id.context.ContextEntry)6 UserSession (org.olat.core.util.UserSession)6 HashSet (java.util.HashSet)4 Locale (java.util.Locale)4 Map (java.util.Map)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4 UserTool (org.olat.admin.user.tools.UserTool)4 UserToolExtension (org.olat.admin.user.tools.UserToolExtension)4 Component (org.olat.core.gui.components.Component)4 FlexiTableSort (org.olat.core.gui.components.form.flexible.elements.FlexiTableSort)4 ProgressBar (org.olat.core.gui.components.progressbar.ProgressBar)4 HistoryPoint (org.olat.core.id.context.HistoryPoint)4 I18nItem (org.olat.core.util.i18n.I18nItem)4 LocationHistory (org.olat.modules.lecture.model.LocationHistory)4 Date (java.util.Date)2 List (java.util.List)2