コード例 #1
0
  private void onDelete(final ClickEvent event) {
    /* Display the confirmation */
    final ConfirmationDialog confirmDialog =
        new ConfirmationDialog(
            i18n.get("caption.filter.delete.confirmbox"),
            i18n.get("message.delete.filter.confirm"),
            i18n.get("button.ok"),
            i18n.get("button.cancel"),
            ok -> {
              if (ok) {
                final Long rowId = (Long) ((Button) event.getComponent()).getData();
                final String deletedFilterName =
                    targetFilterQueryManagement.findTargetFilterQueryById(rowId).getName();
                targetFilterQueryManagement.deleteTargetFilterQuery(rowId);

                /*
                 * Refresh the custom filter table to show latest change
                 * of the deleted custom filter.
                 */

                notification.displaySuccess(
                    i18n.get("message.delete.filter.success", new Object[] {deletedFilterName}));
                refreshContainer();
              }
            });
    UI.getCurrent().addWindow(confirmDialog.getWindow());
    confirmDialog.getWindow().bringToFront();
  }
コード例 #2
0
 private void onClickOfDetailButton(final ClickEvent event) {
   final String targetFilterName = (String) ((Button) event.getComponent()).getData();
   final TargetFilterQuery targetFilterQuery =
       targetFilterQueryManagement.findTargetFilterQueryByName(targetFilterName);
   filterManagementUIState.setFilterQueryValue(targetFilterQuery.getQuery());
   filterManagementUIState.setTfQuery(targetFilterQuery);
   filterManagementUIState.setEditViewDisplayed(true);
   eventBus.publish(this, CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW);
 }
コード例 #3
0
 @Override
 public void buttonClick(ClickEvent event) {
   if (event.getComponent() == okButton) confirmed = true;
   this.close();
 }
コード例 #4
0
  private void onClickOfDistributionSetButton(final ClickEvent event) {
    final Item item = (Item) ((Button) event.getComponent()).getData();
    final Long tfqId = (Long) item.getItemProperty(SPUILabelDefinitions.VAR_ID).getValue();

    dsSelectWindow.showForTargetFilter(tfqId);
  }