Пример #1
0
 private void renderItems() {
   if (group == null) return;
   display.clear();
   List<Setting> settings = group.getSettings();
   for (Setting setting : settings) {
     display.addItem(setting);
   }
 }
Пример #2
0
  private void deleteItems() {
    if (!Window.confirm("Are You Sure?")) return;
    List<Setting> selectedItems = display.getSelectedItems();
    for (Setting setting : selectedItems) {
      group.removeSetting(setting);
    }
    settingService.saveSettingGroup(
        group,
        new HelpCallBack<Void>() {

          @Override
          public void onSuccessPost(Void result) {
            eventBus.fireEvent(
                new LoadRequetEvent<SettingGroup>(
                    SettingGroup.class, LoadRequetEvent.TYPE.REFRESH));
          }
        });
  }