* @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 {
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();
}
/**
+ * 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();