} else if (type.equals("object")) {
final String value = request.getOptionalProperty(VALUE);
final RequestContext context = request.getContext();
final ObjectAdapter object = context.getMappedObject(value);
final DebugString str = new DebugString();
Dump.adapter(object, str);
Dump.graph(object, IsisContext.getAuthenticationSession(), str);
request.appendHtml("<h2>" + object.getSpecification().getFullIdentifier() + "</h2>");
request.appendHtml("<pre class=\"debug\">" + str + "</pre>");
}
}
if (alwaysShow || request.getContext().getDebug() == RequestContext.Debug.ON) {
final RequestContext context = request.getContext();
final String id = request.getOptionalProperty("object");
if (id != null) {
final ObjectAdapter object = context.getMappedObject(id);
if (object instanceof DebuggableWithTitle) {
final DebugString debug = new DebugString();
((DebuggableWithTitle) object).debugData(debug);
request.appendHtml("<pre class=\"debug\">" + debug + "</pre>");
} else {
request.appendHtml(object.toString());
}
}
final String variable = request.getOptionalProperty("variable");
if (variable != null) {
final Object object = context.getVariable(variable);
request.appendHtml(variable + " => " + (object == null ? "null" : object.toString()));
}
final String list = request.getOptionalProperty("list");
if (list != null) {
final DebugString debug = new DebugString();
context.append(debug, list);
request.appendHtml(debug.toString());
}
final String uri = request.getOptionalProperty("uri");
if (uri != null) {
request.appendHtml("<pre class=\"debug\">");