1
|
package eu.etaxonomy.vaadin.ui.navigation;
|
2
|
|
3
|
import org.springframework.beans.factory.annotation.Autowired;
|
4
|
import org.vaadin.spring.events.EventBus.UIEventBus;
|
5
|
|
6
|
import com.vaadin.navigator.Navigator.UriFragmentManager;
|
7
|
import com.vaadin.server.Page;
|
8
|
import com.vaadin.server.Page.UriFragmentChangedEvent;
|
9
|
import com.vaadin.spring.annotation.SpringComponent;
|
10
|
import com.vaadin.spring.annotation.UIScope;
|
11
|
|
12
|
@SpringComponent
|
13
|
@UIScope
|
14
|
public class NavigationUriFragmentManager extends UriFragmentManager {
|
15
|
|
16
|
private static final long serialVersionUID = -2033745435437337863L;
|
17
|
|
18
|
@Autowired
|
19
|
UIEventBus uiEventBus;
|
20
|
|
21
|
public NavigationUriFragmentManager() {
|
22
|
super(Page.getCurrent());
|
23
|
}
|
24
|
|
25
|
@Override
|
26
|
public void uriFragmentChanged(UriFragmentChangedEvent event) {
|
27
|
uiEventBus.publish(this, new NavigationEvent(getState()));
|
28
|
}
|
29
|
}
|