/** Is called when the new value should be saved after the save button has been clicked */
  @Override
  public void saveOrUpdate() {
    if (checkBox.getValue() && dsTable.getValue() != null) {
      final DistributionSetIdName ds = (DistributionSetIdName) dsTable.getValue();
      updateTargetFilterQueryDS(tfqId, ds.getId());

    } else if (!checkBox.getValue()) {
      updateTargetFilterQueryDS(tfqId, null);
    }
  }
 /**
  * Is triggered when the checkbox value changes
  *
  * @param event change event
  */
 @Override
 public void valueChange(final Property.ValueChangeEvent event) {
   dsTable.setVisible(checkBox.getValue());
   if (window != null) {
     window.center();
   }
 }
 public DistributionSetIdName getValue() {
   if (checkBox.getValue()) {
     return (DistributionSetIdName) dsTable.getValue();
   }
   return null;
 }
 public void setValue(final DistributionSetIdName distSet) {
   dsTable.setVisible(distSet != null);
   checkBox.setValue(distSet != null);
   dsTable.setValue(distSet);
   dsTable.setCurrentPageFirstItemId(distSet);
 }
 /**
  * Is triggered when the save button is clicked
  *
  * @return whether the click should be allowed
  */
 @Override
 public boolean canWindowSaveOrUpdate() {
   return !checkBox.getValue() || dsTable.getValue() != null;
 }