Search in sources :

Example 1 with SelectUserListEvent

use of org.olat.modules.fo.ui.events.SelectUserListEvent in project OpenOLAT by OpenOLAT.

the class ForumController method event.

@Override
public void event(UserRequest ureq, Controller source, Event event) {
    if (threadListCtrl == source) {
        if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        } else if (event instanceof SelectUserListEvent) {
            doUserList(ureq);
        }
    } else if (viewCtrl == source) {
        if (event == Event.BACK_EVENT) {
            reloadThreadList |= viewCtrl.hasMarkedNewMessages();
            doThreadList(ureq);
        } else if (event instanceof DeleteThreadEvent) {
            reloadThreadList = true;
            doThreadList(ureq);
        } else if (event instanceof DeleteMessageEvent) {
            reloadThreadList = true;
        } else if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        }
    } else if (userViewCtrl == source) {
        if (event == Event.BACK_EVENT) {
            reloadThreadList |= userViewCtrl.hasMarkedNewMessages();
            cleanUpMessageViews();
            doUserList(ureq);
        } else if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        }
    } else if (userListCtrl == source) {
        if (event == Event.BACK_EVENT) {
            removeAsListenerAndDispose(userListCtrl);
            userListCtrl = null;
            doThreadList(ureq);
        } else if (event instanceof SelectUserEvent) {
            SelectUserEvent sue = (SelectUserEvent) event;
            if (sue.isGuest()) {
                doGuestMessageList(ureq);
            } else if (StringHelper.containsNonWhitespace(sue.getPseudonym())) {
                doPseudonymMessageList(ureq, sue.getIdentityKey(), sue.getPseudonym());
            } else if (sue.getIdentityKey() != null) {
                doUserMessageList(ureq, sue.getIdentityKey());
            }
        }
    }
}
Also used : SelectUserListEvent(org.olat.modules.fo.ui.events.SelectUserListEvent) DeleteThreadEvent(org.olat.modules.fo.ui.events.DeleteThreadEvent) SelectUserEvent(org.olat.modules.fo.ui.events.SelectUserEvent) SelectMessageEvent(org.olat.modules.fo.ui.events.SelectMessageEvent) DeleteMessageEvent(org.olat.modules.fo.ui.events.DeleteMessageEvent)

Example 2 with SelectUserListEvent

use of org.olat.modules.fo.ui.events.SelectUserListEvent in project openolat by klemens.

the class ForumController method event.

@Override
public void event(UserRequest ureq, Controller source, Event event) {
    if (threadListCtrl == source) {
        if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        } else if (event instanceof SelectUserListEvent) {
            doUserList(ureq);
        }
    } else if (viewCtrl == source) {
        if (event == Event.BACK_EVENT) {
            reloadThreadList |= viewCtrl.hasMarkedNewMessages();
            doThreadList(ureq);
        } else if (event instanceof DeleteThreadEvent) {
            reloadThreadList = true;
            doThreadList(ureq);
        } else if (event instanceof DeleteMessageEvent) {
            reloadThreadList = true;
        } else if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        }
    } else if (userViewCtrl == source) {
        if (event == Event.BACK_EVENT) {
            reloadThreadList |= userViewCtrl.hasMarkedNewMessages();
            cleanUpMessageViews();
            doUserList(ureq);
        } else if (event instanceof SelectMessageEvent) {
            doProcessSelectEvent(ureq, (SelectMessageEvent) event);
        }
    } else if (userListCtrl == source) {
        if (event == Event.BACK_EVENT) {
            removeAsListenerAndDispose(userListCtrl);
            userListCtrl = null;
            doThreadList(ureq);
        } else if (event instanceof SelectUserEvent) {
            SelectUserEvent sue = (SelectUserEvent) event;
            if (sue.isGuest()) {
                doGuestMessageList(ureq);
            } else if (StringHelper.containsNonWhitespace(sue.getPseudonym())) {
                doPseudonymMessageList(ureq, sue.getIdentityKey(), sue.getPseudonym());
            } else if (sue.getIdentityKey() != null) {
                doUserMessageList(ureq, sue.getIdentityKey());
            }
        }
    }
}
Also used : SelectUserListEvent(org.olat.modules.fo.ui.events.SelectUserListEvent) DeleteThreadEvent(org.olat.modules.fo.ui.events.DeleteThreadEvent) SelectUserEvent(org.olat.modules.fo.ui.events.SelectUserEvent) SelectMessageEvent(org.olat.modules.fo.ui.events.SelectMessageEvent) DeleteMessageEvent(org.olat.modules.fo.ui.events.DeleteMessageEvent)

Aggregations

DeleteMessageEvent (org.olat.modules.fo.ui.events.DeleteMessageEvent)2 DeleteThreadEvent (org.olat.modules.fo.ui.events.DeleteThreadEvent)2 SelectMessageEvent (org.olat.modules.fo.ui.events.SelectMessageEvent)2 SelectUserEvent (org.olat.modules.fo.ui.events.SelectUserEvent)2 SelectUserListEvent (org.olat.modules.fo.ui.events.SelectUserListEvent)2