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());
}
}
}
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);
}
}
}
}
}
}
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());
}
}
}
Aggregations