Search in sources :

Example 61 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project OpenOLAT by OpenOLAT.

the class ViteroBookingsRunController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == bookingsLink) {
                doOpenBookings(ureq);
            } else if (clickedLink == adminLink) {
                doOpenAdmin(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 62 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project OpenOLAT by OpenOLAT.

the class ViteroAdminBookingInfosController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == infosLink) {
                doOpenInfos(ureq);
            } else if (clickedLink == membersLink) {
                doOpenMembers(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 63 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project OpenOLAT by OpenOLAT.

the class CertificatesAdminController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == settingsLink) {
                doOpenSettings(ureq);
            } else if (clickedLink == certificatesLink) {
                doOpenCertificatesList(ureq);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 64 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project OpenOLAT by OpenOLAT.

the class OverviewBusinessGroupListController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            Controller selectedController = null;
            if (clickedLink == markedGroupsLink) {
                selectedController = updateMarkedGroups(ureq);
            } else if (clickedLink == myGroupsLink) {
                selectedController = updateMyGroups(ureq);
            } else if (clickedLink == openGroupsLink) {
                selectedController = updateOpenGroups(ureq);
            } else if (clickedLink == searchOpenLink) {
                selectedController = updateSearch(ureq);
            }
            addToHistory(ureq, selectedController);
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent) Controller(org.olat.core.gui.control.Controller) BasicController(org.olat.core.gui.control.controller.BasicController)

Example 65 with SegmentViewEvent

use of org.olat.core.gui.components.segmentedview.SegmentViewEvent in project OpenOLAT by OpenOLAT.

the class MultiEvaluationFormController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == segmentView) {
        if (event instanceof SegmentViewEvent) {
            SegmentViewEvent sve = (SegmentViewEvent) event;
            String segmentCName = sve.getComponentName();
            Component clickedLink = mainVC.getComponent(segmentCName);
            if (clickedLink == ownerLink) {
                doOpenEvalutationForm(ureq, owner);
            } else if (clickedLink == compareLink) {
                doOpenOverview(ureq);
            } else if (clickedLink instanceof Link) {
                Link link = (Link) clickedLink;
                Object uobject = link.getUserObject();
                if (uobject instanceof Identity) {
                    doOpenEvalutationForm(ureq, (Identity) uobject);
                }
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent) Identity(org.olat.core.id.Identity) Link(org.olat.core.gui.components.link.Link)

Aggregations

Component (org.olat.core.gui.components.Component)90 SegmentViewComponent (org.olat.core.gui.components.segmentedview.SegmentViewComponent)90 SegmentViewEvent (org.olat.core.gui.components.segmentedview.SegmentViewEvent)90 Link (org.olat.core.gui.components.link.Link)4 Controller (org.olat.core.gui.control.Controller)4 BasicController (org.olat.core.gui.control.controller.BasicController)4 Statistics (org.hibernate.stat.Statistics)2 PopEvent (org.olat.core.gui.components.stack.PopEvent)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 Identity (org.olat.core.id.Identity)2 RepositoryHandler (org.olat.repository.handlers.RepositoryHandler)2 ImportRepositoryEntryController (org.olat.repository.ui.author.ImportRepositoryEntryController)2