public void registerEventHandler(int key,EventHandler eventHandler){
synchronized (this) {
    if (mDispatchInProgressCounter > 0) {
      mToBeAddedEventHandlers.put(key,eventHandler);
    }
 else {
      eventHandlers.put(key,eventHandler);
    }
  }
}

public void registerEventHandler ( int key , EventHandler eventHandler ) { synchronized ( this ) { if ( mDispatchInProgressCounter > 0 ) { mToBeAddedEventHandlers . put ( key , eventHandler ) ; } else { eventHandlers . put ( key , eventHandler ) ; } } }
adds or updates an event handler . this uses a linkedhashmap so that we can replace fragments based on the view id they are being expanded into .
