Revision 74ad1146
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/vaadin/event/EntityEditorActionListener.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.vaadin.event; |
10 | 10 |
|
11 | 11 |
/** |
12 |
* Implementations will usually look like: |
|
13 |
* |
|
14 |
* <pre> |
|
15 |
myComboboxSelect.setEditActionListener(e -> { |
|
16 |
|
|
17 |
Object fieldValue = e.getSource().getValue(); |
|
18 |
Integer beanId = null; |
|
19 |
if(fieldValue != null){ |
|
20 |
beanId = ((CdmBase)fieldValue).getId(); |
|
21 |
|
|
22 |
} |
|
23 |
getViewEventBus().publish(this, new SomeEditorAction(e.getAction(), beanId, e.getSource(), this)); |
|
24 |
}); |
|
25 |
} |
|
26 |
*</pre> |
|
12 | 27 |
* @author a.kohlbecker |
13 | 28 |
* @since Jan 17, 2018 |
14 | 29 |
* |
15 | 30 |
*/ |
16 | 31 |
public interface EntityEditorActionListener { |
17 | 32 |
|
33 |
|
|
34 |
/** |
|
35 |
* see type level documentation for implementation hints. |
|
36 |
* |
|
37 |
* @param action |
|
38 |
*/ |
|
18 | 39 |
public void onEntityEditorActionEvent(EntityEditorActionEvent action); |
19 | 40 |
|
20 | 41 |
} |
Also available in: Unified diff
documenting intendet usage of EntityEditorActionListener