documentation
authorKatja Luther <k.luther@bgbm.org>
Thu, 16 Jun 2016 09:39:38 +0000 (11:39 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 16 Jun 2016 09:39:38 +0000 (11:39 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CdmFilteredItemsSelectionDialog.java

index 45a5810430cc3b7bac7259f6646bb8691ed3a191..da23062ff27ceb618ab739c263eb278e24c21cde 100644 (file)
@@ -127,7 +127,17 @@ import org.eclipse.ui.statushandlers.StatusManager;
  * @author k.luther
  * @date 10.06.2016
  *
+ * This is a class copied from FilteredItemsSelectionDialog and adapted to the Cdm use case. The original
+ * dialog gets all items when opening the dialog and then apply the filter on all items.
+ * In our case we need a possibility to filter the items already when getting them from the DB, so we adapt the
+ * original class
+ * original description:
+ * Shows a list of items to the user with a text entry field for a string
+ * pattern used to filter the list of items.
+ *
+ *
  */
+
 public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDialog {
 
 
@@ -1185,11 +1195,13 @@ public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDia
         protected abstract ItemsFilter createFilter();
 
         /**
+         *
          * Applies the filter created by <code>createFilter()</code> method to the
          * items list. When new filter is different than previous one it will cause
          * refiltering.
          */
         protected void applyFilter() {
+            // to get an already filtered selection of the database we added the initModel() method here.
             initModel();
             ItemsFilter newFilter = createFilter();
 
@@ -3404,6 +3416,7 @@ public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDia
         }
 
         /**
+         * we have to call the initModel() method in the applyFilter method, so we had to add this abstract method (moved from AbstractFilteredCdmResourceSelectionDialog)
          * <p>initModel</p>
          */
         abstract protected void initModel();