use of org.olat.core.util.mail.ui.MailDataModel.ContextPair in project OpenOLAT by OpenOLAT.
the class MailContextCellRenderer method render.
@Override
public void render(StringOutput sb, Renderer renderer, Object val, Locale locale, int alignment, String action) {
if (val instanceof ContextPair) {
ContextPair context = (ContextPair) val;
if (renderer == null) {
StringHelper.escapeHtml(sb, context.getName());
} else {
String contextName = StringHelper.escapeHtml(context.getName());
Link link = LinkFactory.createLink("bp_" + UUID.randomUUID().toString(), container, listeningController);
link.setCustomDisplayText(contextName);
link.setUserObject(context.getBusinessPath());
URLBuilder ubu = renderer.getUrlBuilder().createCopyFor(link);
RenderResult renderResult = new RenderResult();
link.getHTMLRendererSingleton().render(renderer, sb, link, ubu, translator, renderResult, null);
}
}
}
use of org.olat.core.util.mail.ui.MailDataModel.ContextPair in project openolat by klemens.
the class MailContextCellRenderer method render.
@Override
public void render(StringOutput sb, Renderer renderer, Object val, Locale locale, int alignment, String action) {
if (val instanceof ContextPair) {
ContextPair context = (ContextPair) val;
if (renderer == null) {
StringHelper.escapeHtml(sb, context.getName());
} else {
String contextName = StringHelper.escapeHtml(context.getName());
Link link = LinkFactory.createLink("bp_" + UUID.randomUUID().toString(), container, listeningController);
link.setCustomDisplayText(contextName);
link.setUserObject(context.getBusinessPath());
URLBuilder ubu = renderer.getUrlBuilder().createCopyFor(link);
RenderResult renderResult = new RenderResult();
link.getHTMLRendererSingleton().render(renderer, sb, link, ubu, translator, renderResult, null);
}
}
}
Aggregations