}
@SuppressWarnings("unchecked")
private static String writeDebugOutput(FacesContext faces) throws IOException
{
FastWriter fw = new FastWriter();
ErrorPageWriter.debugHtml(fw, faces);
Map<String, Object> session = faces.getExternalContext().getSessionMap();
Map<String, String> debugs = (Map<String, String>) session.get(KEY);
if (debugs == null)
{
debugs = new LinkedHashMap<String, String>()
{
protected boolean removeEldestEntry(Entry<String, String> eldest)
{
return (this.size() > 5);
}
};
session.put(KEY, debugs);
}
String id = String.valueOf(nextId++);
debugs.put(id, fw.toString());
return id;
}