Search in sources :

Example 6 with TabbedPaneChangedEvent

use of org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent in project OpenOLAT by OpenOLAT.

the class ItemNodeTabbedFormController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (event instanceof TabbedPaneChangedEvent) {
        TabbedPaneChangedEvent tabbedPaneEvent = (TabbedPaneChangedEvent) event;
        if (feedbackPanel.equals(tabbedPaneEvent.getNewComponent())) {
            if (feedbackCtr != null)
                removeAsListenerAndDispose(feedbackCtr);
            feedbackCtr = new FeedbackFormController(ureq, getWindowControl(), qtiPackage, item, restrictedEdit);
            // feedback controller sends out NodeBeforeChangeEvents which must be propagated
            listenTo(feedbackCtr);
            feedbackPanel.setContent(feedbackCtr.getInitialComponent());
        }
    }
}
Also used : TabbedPaneChangedEvent(org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent)

Example 7 with TabbedPaneChangedEvent

use of org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent in project openolat by klemens.

the class CalendarEntryDetailsController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == pane) {
        if (event instanceof TabbedPaneChangedEvent) {
            // prepare links tab
            TabbedPaneChangedEvent tpce = (TabbedPaneChangedEvent) event;
            if (tpce.getNewComponent().equals(linkVC)) {
                // display link provider if any
                String calendarID = eventForm.getChoosenKalendarID();
                KalendarRenderWrapper calendarWrapper = null;
                for (Iterator<KalendarRenderWrapper> iter = availableCalendars.iterator(); iter.hasNext(); ) {
                    calendarWrapper = iter.next();
                    if (calendarWrapper.getKalendar().getCalendarID().equals(calendarID)) {
                        break;
                    }
                }
                if (activeLinkProvider == null) {
                    activeLinkProvider = calendarWrapper.getLinkProvider();
                    if (activeLinkProvider != null) {
                        activeLinkProvider.addControllerListener(this);
                        activeLinkProvider.setKalendarEvent(kalendarEvent);
                        activeLinkProvider.setDisplayOnly(isReadOnly);
                        linkVC.put("linkprovider", activeLinkProvider.getControler().getInitialComponent());
                        linkVC.contextPut("hasLinkProvider", Boolean.TRUE);
                    } else {
                        linkVC.contextPut("hasLinkProvider", Boolean.FALSE);
                    }
                }
            }
        }
    }
}
Also used : TabbedPaneChangedEvent(org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent) KalendarRenderWrapper(org.olat.commons.calendar.ui.components.KalendarRenderWrapper)

Example 8 with TabbedPaneChangedEvent

use of org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent in project openolat by klemens.

the class ItemNodeTabbedFormController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (event instanceof TabbedPaneChangedEvent) {
        TabbedPaneChangedEvent tabbedPaneEvent = (TabbedPaneChangedEvent) event;
        if (feedbackPanel.equals(tabbedPaneEvent.getNewComponent())) {
            if (feedbackCtr != null)
                removeAsListenerAndDispose(feedbackCtr);
            feedbackCtr = new FeedbackFormController(ureq, getWindowControl(), qtiPackage, item, restrictedEdit);
            // feedback controller sends out NodeBeforeChangeEvents which must be propagated
            listenTo(feedbackCtr);
            feedbackPanel.setContent(feedbackCtr.getInitialComponent());
        }
    }
}
Also used : TabbedPaneChangedEvent(org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent)

Aggregations

TabbedPaneChangedEvent (org.olat.core.gui.components.tabbedpane.TabbedPaneChangedEvent)8 KalendarRenderWrapper (org.olat.commons.calendar.ui.components.KalendarRenderWrapper)2 Component (org.olat.core.gui.components.Component)2 JSAndCSSComponent (org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent)2 Link (org.olat.core.gui.components.link.Link)2 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)2 CloseableCalloutWindowController (org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)2 User (org.olat.core.id.User)2 MediaCollectorComponent (org.olat.modules.portfolio.ui.component.MediaCollectorComponent)2 ErrorEvent (org.olat.modules.wiki.gui.components.wikiToHtml.ErrorEvent)2 RequestImageEvent (org.olat.modules.wiki.gui.components.wikiToHtml.RequestImageEvent)2 RequestMediaEvent (org.olat.modules.wiki.gui.components.wikiToHtml.RequestMediaEvent)2 RequestNewPageEvent (org.olat.modules.wiki.gui.components.wikiToHtml.RequestNewPageEvent)2 RequestPageEvent (org.olat.modules.wiki.gui.components.wikiToHtml.RequestPageEvent)2 WikiMarkupComponent (org.olat.modules.wiki.gui.components.wikiToHtml.WikiMarkupComponent)2