Пример #1
0
  private void deleteSelected() {
    if (Window.confirm(
        constants.AreYouSureYouWantToDeleteCategory() + explorer.getSelectedPath())) {
      RepositoryServiceFactory.getCategoryService()
          .removeCategory(
              explorer.getSelectedPath(),
              new GenericCallback<java.lang.Void>() {

                public void onSuccess(Void v) {
                  explorer.refresh();
                }
              });
    }
  }
Пример #2
0
  private void renameSelected() {

    String name = Window.prompt(constants.CategoryNewNamePleaseEnter(), "");
    if (name != null) {
      RepositoryServiceFactory.getCategoryService()
          .renameCategory(
              explorer.getSelectedPath(),
              name,
              new GenericCallback<java.lang.Void>() {
                public void onSuccess(Void v) {
                  Window.alert(constants.CategoryRenamed());
                  explorer.refresh();
                }
              });
    }
  }