Project

General

Profile

Revision c31b09a1

IDc31b09a187ff813c780395e7988ca8a877e8eab8
Parent 450785be
Child 4cfb3625

Added by Fabian Reimeier about 3 years ago

ref #6903 prevent settings window to pop up with every reload and login when session attributes are already set

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/distributionStatus/DistributionTablePresenter.java
300 300
	 */
301 301
	@Override
302 302
	protected void onPresenterReady() {
303
//        VaadinSession.getCurrent().setAttribute(DistributionEditorUtil.SATTR_TAXON_NODES_UUID, taxonNodes);
304
//        VaadinSession.getCurrent().setAttribute(DistributionEditorUtil.SATTR_SELECTED_AREA_VOCABULARY_UUID, voc.getUuid());
305
//        VaadinSession.getCurrent().setAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS, selectedAreas);
306
//        VaadinSession.getCurrent().setAttribute(DistributionEditorUtil.SATTR_CLASSIFICATION, classificationUuid);
307
	    if(userHelper.userIsAutheticated() && !userHelper.userIsAnnonymous()) {
303
	    /*
304
         * This method is called twice. One time before and one time after login.
305
         * The area and taxon settings window should only be displayed after login
306
         * and only when no classification and areas are chosen yet.
307
         */
308
	    VaadinSession vaadinSession = VaadinSession.getCurrent();
309
	    if(userHelper.userIsAutheticated()
310
	            && !userHelper.userIsAnnonymous()
311
	            && (vaadinSession.getAttribute(DistributionEditorUtil.SATTR_CLASSIFICATION) == null
312
	            || vaadinSession.getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREA_VOCABULARY_UUID) == null
313
	            || vaadinSession.getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS) == null)) {
308 314
            getView().openAreaAndTaxonSettings();
309 315
        }
310 316
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)