@Override
  public void edit(LoginModel object) {
    // Activate Login on click
    final UICommand loginCommand = object.getLoginCommand();
    loginButton.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            loginCommand.Execute();
          }
        });

    // Workaround: add Login Command to the Commands List
    // This is required by the Editor framework
    loginCommand.setIsDefault(true);
    object.getCommands().add(loginCommand);

    // Add popup key handlers
    final DeferredModelCommandInvoker commandInvoker = new DeferredModelCommandInvoker(object);
    popup.setKeyPressHandler(
        new PopupNativeKeyPressHandler() {
          @Override
          public void onKeyPress(NativeEvent event) {
            if (KeyCodes.KEY_ENTER == event.getKeyCode()) {
              commandInvoker.invokeDefaultCommand();
            }
          }
        });

    Driver.driver.edit(object);
  }
 void localize(ApplicationConstants constants) {
   userNameEditor.setLabel(constants.loginFormUserNameLabel());
   passwordEditor.setLabel(constants.loginFormPasswordLabel());
   domainEditor.setLabel(constants.loginFormDomainLabel());
   loginButton.setText(constants.loginButtonLabel());
 }