use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class SharedItemsOverviewController 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 == favoriteLink) {
doOpenMark(ureq);
} else if (clickedLink == pagesLink) {
doOpenPages(ureq);
} else if (clickedLink == bindersLink) {
doOpenBinders(ureq);
}
}
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class SmsPhoneComponentRenderer method render.
@Override
public void render(Renderer renderer, StringOutput sb, Component source, URLBuilder ubu, Translator translator, RenderResult renderResult, String[] args) {
SmsPhoneComponent smsCmp = (SmsPhoneComponent) source;
SmsPhoneElement smsFte = smsCmp.getSmsPhoneElement();
String id = smsCmp.getFormDispatchId();
String phoneNumber = smsFte.getPhone();
if (!StringHelper.containsNonWhitespace(phoneNumber)) {
phoneNumber = smsFte.getTranslator().translate("sms.phone.not.available");
}
sb.append("<p id=\"").append(id).append("\" ").append(" class='form-control-static ");
if (StringHelper.containsNonWhitespace(smsCmp.getElementCssClass())) {
sb.append(smsCmp.getElementCssClass());
}
sb.append("'>").append(phoneNumber).append("</p>");
sb.append("<div class='o_form_example help-block'>").append(smsFte.getTranslator().translate("sms.phone.hint")).append("</div>");
if (smsFte.getAndResetFormDirty()) {
FormJSHelper.setFlexiFormDirtyOnLoad(sb, smsFte.getRootForm());
}
sb.append("<div class='form-inline'>");
FormLink editLink = smsFte.getEditLink();
if (editLink != null && editLink.isVisible()) {
Component cmp = editLink.getComponent();
cmp.getHTMLRendererSingleton().render(renderer, sb, cmp, ubu, translator, renderResult, args);
}
if (StringHelper.containsNonWhitespace(phoneNumber)) {
sb.append(" ");
FormLink removeLink = smsFte.getRemoveLink();
if (removeLink != null && removeLink.isVisible()) {
Component cmp = removeLink.getComponent();
cmp.getHTMLRendererSingleton().render(renderer, sb, cmp, ubu, translator, renderResult, args);
}
}
sb.append("</div>");
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class AssessedIdentityOverviewController 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 == checkListLink) {
doOpenCheckList(ureq);
} else if (clickedLink == assessmentLink) {
doOpenAssessment(ureq);
}
}
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class CheckListRunForCoachController 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 == runLink) {
doOpenRun(ureq);
} else if (clickedLink == coachLink) {
doOpenCoach(ureq);
}
}
}
}
use of org.olat.core.gui.components.Component in project OpenOLAT by OpenOLAT.
the class SelectBusinessGroupController 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 == markedGroupsLink) {
updateMarkedGroups(ureq);
} else if (clickedLink == ownedGroupsLink) {
updateOwnedGroups(ureq);
} else if (clickedLink == courseGroupsLink) {
updateCourseGroups(ureq);
} else if (clickedLink == searchOpenLink) {
updateSearch(ureq);
} else if (clickedLink == adminSearchOpenLink) {
updateAdminSearch(ureq);
}
}
} else if (createGroup == source) {
doCreate(ureq);
}
}
Aggregations