Revision a735bbbf
Added by Andreas Kohlbecker about 7 years ago
- ID a735bbbfccc284e24f355551d2496cd15e790243
- Parent a1dac6b2
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/RedirectAfterLoginView.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.vaadin.view.dbstatus; |
2 | 2 |
|
3 |
import org.springframework.beans.factory.annotation.Autowired; |
|
4 |
import org.springframework.context.annotation.Scope; |
|
5 |
|
|
3 | 6 |
import com.vaadin.navigator.View; |
4 | 7 |
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; |
8 |
import com.vaadin.spring.annotation.SpringComponent; |
|
5 | 9 |
import com.vaadin.ui.CustomComponent; |
6 | 10 |
import com.vaadin.ui.UI; |
7 | 11 |
|
8 |
import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.DistributionTablePresenter; |
|
9 | 12 |
import eu.etaxonomy.cdm.vaadin.util.DistributionEditorUtil; |
10 | 13 |
|
14 |
@SpringComponent |
|
15 |
@Scope("prototype") |
|
11 | 16 |
public class RedirectAfterLoginView extends CustomComponent implements View{ |
12 | 17 |
|
13 | 18 |
private static final long serialVersionUID = 7678509076808950380L; |
14 | 19 |
|
20 |
@Autowired |
|
21 |
private DistributionTableView distributionTableView = null; |
|
22 |
|
|
15 | 23 |
@Override |
16 | 24 |
public void enter(ViewChangeEvent event) { |
17 | 25 |
//navigate to table view |
18 |
DistributionTableView distributionTableView = new DistributionTableView(); |
|
19 |
new DistributionTablePresenter(distributionTableView); |
|
20 | 26 |
UI.getCurrent().getNavigator().removeView(DistributionEditorUtil.VIEW_TABLE); |
21 | 27 |
UI.getCurrent().getNavigator().addView(DistributionEditorUtil.VIEW_TABLE, distributionTableView); |
22 | 28 |
UI.getCurrent().getNavigator().navigateTo(DistributionEditorUtil.VIEW_TABLE); |
23 |
|
|
29 |
|
|
24 | 30 |
DistributionEditorUtil.clearSessionAttributes(); |
25 | 31 |
distributionTableView.openDistributionSettings(); |
26 | 32 |
} |
Also available in: Unified diff
ref #5285 attempt to avoid using the CdmSpringContextHelper
using DI to get rid of CdmSpringContextHelper, but got stuck due to the complexity and variety of the 'design patterns' that have been used.