use of org.olat.core.gui.control.info.WindowControlInfo in project OpenOLAT by OpenOLAT.
the class ValidatingVisitor method appendDispatchDebugInfos.
private void appendDispatchDebugInfos(Component target, StringBuilder debugMsg) {
Controller c = target.getLatestDispatchedController();
if (c != null) {
WindowControl wCo = null;
try {
wCo = c.getWindowControlForDebug();
} catch (Exception e) {
// getWindowControl throw an Assertion if wControl = null
}
if (wCo != null) {
String coInfo = "";
WindowControlInfo wci = wCo.getWindowControlInfo();
while (wci != null) {
String cName = wci.getControllerClassName();
coInfo = cName + ":" + coInfo;
wci = wci.getParentWindowControlInfo();
}
BusinessControl bc = wCo.getBusinessControl();
String businessPath = bc == null ? "n/a" : bc.getAsString();
String compName = target.getComponentName();
String msg = "wci:" + coInfo + "%%" + compName + "%%" + businessPath + "%%";
// allowed for debugging, dispatching is already over
Event ev = target.getAndClearLatestFiredEvent();
if (ev != null) {
msg += ev.getClass().getName() + ":" + ev.getCommand() + "%%";
}
String targetInfo = target.getExtendedDebugInfo();
msg += targetInfo + "%%";
debugMsg.append(msg).append(LOG_SEPARATOR);
} else {
// no windowcontrol -> ignore
}
}
// else: a component with -no- controller as listener, makes no sense in 99.99% of the cases; ignore in those rare cases
}
use of org.olat.core.gui.control.info.WindowControlInfo in project openolat by klemens.
the class ValidatingVisitor method appendDispatchDebugInfos.
private void appendDispatchDebugInfos(Component target, StringBuilder debugMsg) {
Controller c = target.getLatestDispatchedController();
if (c != null) {
WindowControl wCo = null;
try {
wCo = c.getWindowControlForDebug();
} catch (Exception e) {
// getWindowControl throw an Assertion if wControl = null
}
if (wCo != null) {
String coInfo = "";
WindowControlInfo wci = wCo.getWindowControlInfo();
while (wci != null) {
String cName = wci.getControllerClassName();
coInfo = cName + ":" + coInfo;
wci = wci.getParentWindowControlInfo();
}
BusinessControl bc = wCo.getBusinessControl();
String businessPath = bc == null ? "n/a" : bc.getAsString();
String compName = target.getComponentName();
String msg = "wci:" + coInfo + "%%" + compName + "%%" + businessPath + "%%";
// allowed for debugging, dispatching is already over
Event ev = target.getAndClearLatestFiredEvent();
if (ev != null) {
msg += ev.getClass().getName() + ":" + ev.getCommand() + "%%";
}
String targetInfo = target.getExtendedDebugInfo();
msg += targetInfo + "%%";
debugMsg.append(msg).append(LOG_SEPARATOR);
} else {
// no windowcontrol -> ignore
}
}
// else: a component with -no- controller as listener, makes no sense in 99.99% of the cases; ignore in those rare cases
}
Aggregations