code: public void registerUndoRedo(Button undo, Button redo) {
  
          if (getState().m_enableUndoRedo) {
              throw new RuntimeException("Undo/redo already registered.");
          }
          undo.setId(HTML_ID_PREFIX + m_componentId + "-undo");
          redo.setId(HTML_ID_PREFIX + m_componentId + "-redo");
          getState().m_enableUndoRedo = true;
          markAsDirty();
      }
docs: Registers the given buttons as undo redo buttons.<p>
  
  @param undo the undo button
  @param redo the redo button