use of org.olat.core.gui.components.Component in project openolat by klemens.
the class ViteroAdminController 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 == accountLink) {
doOpenAccountSettings(ureq);
} else if (clickedLink == bookingsLink) {
doOpenBookings(ureq);
}
}
}
}
use of org.olat.core.gui.components.Component in project openolat by klemens.
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);
}
}
}
}
use of org.olat.core.gui.components.Component in project openolat by klemens.
the class UserSettingsController 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 (source == segmentView) {
if (event instanceof SegmentViewEvent) {
SegmentViewEvent sve = (SegmentViewEvent) event;
String segmentCName = sve.getComponentName();
Component clickedLink = mainVC.getComponent(segmentCName);
if (clickedLink == preferencesLink) {
doOpenPreferences(ureq);
} else if (clickedLink == webdavLink) {
doOpenWebDAV(ureq);
} else if (clickedLink == imLink) {
doOpenIM(ureq);
} else if (clickedLink == disclaimerLink) {
doOpenDisclaimer(ureq);
}
}
}
}
use of org.olat.core.gui.components.Component in project openolat by klemens.
the class UserInterestsRenderer method render.
@Override
public void render(Renderer renderer, StringOutput sb, Component source, URLBuilder ubu, Translator translator, RenderResult renderResult, String[] args) {
UserInterestsComponent uiCmp = (UserInterestsComponent) source;
UserInterestsElement uiFte = uiCmp.getUserInterestsElement();
List<String> userInterests = uiFte.getUserInterests();
if (userInterests.size() > 0) {
sb.append("<ul class='list-unstyled'>");
for (String userInterest : userInterests) {
sb.append("<li>").append(userInterest).append("</li>");
}
sb.append("</ul>");
}
FormLink editLink = uiFte.getEditLink();
if (editLink != null && editLink.isVisible()) {
Component cmp = editLink.getComponent();
cmp.getHTMLRendererSingleton().render(renderer, sb, cmp, ubu, translator, renderResult, args);
}
}
use of org.olat.core.gui.components.Component in project openolat by klemens.
the class QuestionItemDetailsController method initStatusTools.
private void initStatusTools() {
Component statusCmp;
if (canChangeStatus()) {
statusCmp = buildStatusDrowdown();
} else {
statusCmp = buildStatusLink();
}
stackPanel.addTool(statusCmp, Align.left);
}
Aggregations