Project

General

Profile

Revision b19b631a

IDb19b631ab1a1db7915e0ac4ac844c04a08e4b4ab
Parent eded01b7
Child 5ccedc9e

Added by Andreas Kohlbecker over 2 years ago

fix #7476 initializing PagingProviders after view refresh

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
187 187
        return getRepo().getRegistrationService().load(event.getEntityUuid(), Arrays.asList(new String []{"blockedBy"}));
188 188
    }
189 189

  
190

  
191 190
    /**
192 191
     * @param doReload TODO
193 192
     *
......
199 198
        if(doReload){
200 199
            loadWorkingSet(workingset.getCitationUuid());
201 200
        }
202
        getView().setWorkingset(workingset);
201
        applyWorkingset();
203 202
    }
204 203

  
205

  
206 204
    /**
207 205
     * {@inheritDoc}
208 206
     */
209 207
    @Override
210 208
    public void handleViewEntered() {
211

  
212 209
        super.handleViewEntered();
213

  
214 210
        loadWorkingSet(getView().getCitationUuid());
215
        getView().setWorkingset(workingset);
211
        applyWorkingset();
216 212

  
213
    }
214

  
215
    private void applyWorkingset(){
216
         getView().setWorkingset(workingset);
217 217
        // PagingProviders and CacheGenerator for the existingNameCombobox
218
        activateComboboxes();
219
        // update the messages
220
        updateMessages();
221
    }
222

  
223
    /**
224
     *
225
     */
226
    protected void activateComboboxes() {
218 227
        CdmFilterablePagingProvider<TaxonName, TaxonName> pagingProvider = new CdmFilterablePagingProvider<TaxonName, TaxonName>(
219 228
                getRepo().getNameService());
220 229
        CdmTitleCacheCaptionGenerator<TaxonName> titleCacheGenerator = new CdmTitleCacheCaptionGenerator<TaxonName>();
221 230
        getView().getAddExistingNameCombobox().setCaptionGenerator(titleCacheGenerator);
222 231
        getView().getAddExistingNameCombobox().loadFrom(pagingProvider, pagingProvider, pagingProvider.getPageSize());
232
    }
223 233

  
224
        // update the messages
234
    /**
235
     *
236
     */
237
    protected void updateMessages() {
225 238
        User user = UserHelper.fromSession().user();
226 239
        for (UUID registrationUuid : getView().getRegistrationItemMap().keySet()) {
227 240
            Button messageButton = getView().getRegistrationItemMap().get(registrationUuid).regItemButtons.getMessagesButton();
......
255 268
                messageButton.setComponentError(new SystemError(e.getMessage(), e));
256 269
            }
257 270
        }
258

  
259 271
    }
260 272

  
261 273

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)