Revision ad4585b6
Added by Cherian Mathew about 9 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmVaadinSessionUtilities.java | ||
---|---|---|
12 | 12 |
import com.vaadin.server.VaadinSession; |
13 | 13 |
|
14 | 14 |
import eu.etaxonomy.cdm.vaadin.session.CdmDataChangeService; |
15 |
import eu.etaxonomy.cdm.vaadin.session.SelectionService; |
|
15 | 16 |
|
16 | 17 |
/** |
17 | 18 |
* @author cmathew |
... | ... | |
29 | 30 |
} |
30 | 31 |
} |
31 | 32 |
|
33 |
public static void initCdmDataChangeService() { |
|
34 |
setCurrentAttribute(CdmDataChangeService.KEY, new CdmDataChangeService()); |
|
35 |
} |
|
36 |
|
|
32 | 37 |
public static CdmDataChangeService getCurrentCdmDataChangeService() { |
33 | 38 |
return (CdmDataChangeService) VaadinSession.getCurrent().getAttribute(CdmDataChangeService.KEY); |
34 | 39 |
} |
35 | 40 |
|
41 |
public static void initSelectionService() { |
|
42 |
setCurrentAttribute(SelectionService.KEY, new SelectionService()); |
|
43 |
} |
|
44 |
|
|
45 |
public static SelectionService getCurrentSelectionService() { |
|
46 |
return (SelectionService) VaadinSession.getCurrent().getAttribute(SelectionService.KEY); |
|
47 |
} |
|
36 | 48 |
} |
Also available in: Unified diff
added methods to init / get selection service