Project

General

Profile

« Previous | Next » 

Revision de5abb9d

Added by Katja Luther almost 8 years ago

documentation

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/CdmFilteredItemsSelectionDialog.java
127 127
 * @author k.luther
128 128
 * @date 10.06.2016
129 129
 *
130
 * This is a class copied from FilteredItemsSelectionDialog and adapted to the Cdm use case. The original
131
 * dialog gets all items when opening the dialog and then apply the filter on all items.
132
 * In our case we need a possibility to filter the items already when getting them from the DB, so we adapt the
133
 * original class
134
 * original description:
135
 * Shows a list of items to the user with a text entry field for a string
136
 * pattern used to filter the list of items.
137
 *
138
 *
130 139
 */
140

  
131 141
public abstract class CdmFilteredItemsSelectionDialog extends SelectionStatusDialog {
132 142

  
133 143

  
......
1185 1195
        protected abstract ItemsFilter createFilter();
1186 1196

  
1187 1197
        /**
1198
         *
1188 1199
         * Applies the filter created by <code>createFilter()</code> method to the
1189 1200
         * items list. When new filter is different than previous one it will cause
1190 1201
         * refiltering.
1191 1202
         */
1192 1203
        protected void applyFilter() {
1204
            // to get an already filtered selection of the database we added the initModel() method here.
1193 1205
            initModel();
1194 1206
            ItemsFilter newFilter = createFilter();
1195 1207

  
......
3404 3416
        }
3405 3417

  
3406 3418
        /**
3419
         * we have to call the initModel() method in the applyFilter method, so we had to add this abstract method (moved from AbstractFilteredCdmResourceSelectionDialog)
3407 3420
         * <p>initModel</p>
3408 3421
         */
3409 3422
        abstract protected void initModel();

Also available in: Unified diff