File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/main/java/crud/vaadin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 15
15
import org .springframework .data .domain .PageRequest ;
16
16
import org .springframework .data .domain .Sort ;
17
17
import org .vaadin .spring .events .EventBus ;
18
- import org .vaadin .spring .events .EventBusListener ;
18
+ import org .vaadin .spring .events .EventScope ;
19
+ import org .vaadin .spring .events .annotation .EventBusListenerMethod ;
19
20
import org .vaadin .viritin .button .ConfirmButton ;
20
21
import org .vaadin .viritin .button .MButton ;
21
22
import org .vaadin .viritin .components .DisclosurePanel ;
28
29
@ Title ("PhoneBook CRUD example" )
29
30
@ Theme ("valo" )
30
31
@ SpringUI
31
- public class MainUI extends UI implements EventBusListener < PersonModifiedEvent > {
32
+ public class MainUI extends UI {
32
33
33
34
private static final long serialVersionUID = 1L ;
34
35
@@ -138,9 +139,9 @@ protected void edit(final Person phoneBookEntry) {
138
139
personForm .setEntity (phoneBookEntry );
139
140
personForm .openInModalPopup ();
140
141
}
141
-
142
- @ Override
143
- public void onEvent ( org . vaadin . spring . events . Event < PersonModifiedEvent > event ) {
142
+
143
+ @ EventBusListenerMethod ( scope = EventScope . UI )
144
+ public void onPersonModified ( PersonModifiedEvent event ) {
144
145
listEntities ();
145
146
personForm .closePopup ();
146
147
}
You can’t perform that action at this time.
0 commit comments