@Override
 public void renderHead(Component c, IHeaderResponse response) {
   super.renderHead(c, response);
   // Don't pass an id, since every EditableComponent will have its own
   // submit script:
   response.render(JavaScriptHeaderItem.forScript(createSaveScript(), null));
   response.render(JavaScriptHeaderItem.forScript(createCancelScript(), null));
 }
  @Override
  public void renderHead(Component component, IHeaderResponse response) {
    super.renderHead(component, response);

    response.render(
        JavaScriptHeaderItem.forScript(
            "function onClickAlert(text)\n {\n alert(text);\n }\n", getClass().getName()));
  }