to.etc.domui.util.bugs
Class DefaultBugListener

java.lang.Object
  extended by to.etc.domui.util.bugs.DefaultBugListener
All Implemented Interfaces:
IBugListener

public class DefaultBugListener
extends java.lang.Object
implements IBugListener

This is a default DomUI bug listener. It collects all bugs in the ConversationContext, and has code to show those bugs in the UI.

Author:
Frits Jalvingh Created on Jun 18, 2010

Constructor Summary
DefaultBugListener()
           
 
Method Summary
 void bugSignaled(BugItem item)
           
protected static void checkForBugs(IRequestContext ctx, Page pg)
          Check if the page has bugs and if so show a bug icon in it's top.
protected static void clearMessages(to.etc.domui.util.bugs.DefaultBugListener.BugRef ref)
           
static void onRequestAfter(IRequestContext rc)
          Should be called from a request interceptor.
protected static void onRequestBefore(IRequestContext rc)
           
static void registerSessionListener(DomApplication da)
          Call in Application.initialize() to register stuff to use the default bug handler.
protected static void toggleBugDisplay(Page pg, to.etc.domui.util.bugs.DefaultBugListener.BugRef ref)
          Toggles the bug display floater.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBugListener

public DefaultBugListener()
Method Detail

bugSignaled

public void bugSignaled(BugItem item)
Specified by:
bugSignaled in interface IBugListener
See Also:
IBugListener.bugSignaled(to.etc.domui.util.bugs.BugItem)

onRequestAfter

public static void onRequestAfter(IRequestContext rc)
Should be called from a request interceptor. It clears the bug listener for this thread. Since that remains in the conversation it's contents is not lost, except when the conversation itself is gone.

Parameters:
rc -

onRequestBefore

protected static void onRequestBefore(IRequestContext rc)

registerSessionListener

public static void registerSessionListener(DomApplication da)
Call in Application.initialize() to register stuff to use the default bug handler.

Parameters:
da -

checkForBugs

protected static void checkForBugs(IRequestContext ctx,
                                   Page pg)
Check if the page has bugs and if so show a bug icon in it's top. When the bug icon is clicked show the bugs in a floating popup thingerydoo.

Parameters:
ctx -
pg -

clearMessages

protected static void clearMessages(to.etc.domui.util.bugs.DefaultBugListener.BugRef ref)

toggleBugDisplay

protected static void toggleBugDisplay(Page pg,
                                       to.etc.domui.util.bugs.DefaultBugListener.BugRef ref)
Toggles the bug display floater.

Parameters:
pg -
info -