Revision b3f62829
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
62 | 62 |
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.EditorActionContext; |
63 | 63 |
import eu.etaxonomy.vaadin.component.NestedFieldGroup; |
64 | 64 |
import eu.etaxonomy.vaadin.component.SwitchableTextField; |
65 |
import eu.etaxonomy.vaadin.event.FieldReplaceEvent; |
|
65 | 66 |
import eu.etaxonomy.vaadin.mvp.event.EditorDeleteEvent; |
66 | 67 |
import eu.etaxonomy.vaadin.mvp.event.EditorPreSaveEvent; |
67 | 68 |
import eu.etaxonomy.vaadin.mvp.event.EditorSaveEvent; |
... | ... | |
584 | 585 |
fieldGroup.bind(field, propertyId); |
585 | 586 |
} |
586 | 587 |
|
588 |
protected void unbindField(Field field){ |
|
589 |
fieldGroup.unbind(field); |
|
590 |
} |
|
591 |
|
|
587 | 592 |
/** |
588 | 593 |
* @param component |
589 | 594 |
*/ |
... | ... | |
813 | 818 |
} |
814 | 819 |
} |
815 | 820 |
|
821 |
protected AbstractField<String> replaceComponent(String propertyId, AbstractField<String> oldField, AbstractField<String> newField, int column1, int row1, int column2, |
|
822 |
int row2) { |
|
823 |
String value = oldField.getValue(); |
|
824 |
newField.setValue(value); |
|
825 |
newField.setCaption(oldField.getCaption()); |
|
826 |
GridLayout grid = (GridLayout)getFieldLayout(); |
|
827 |
grid.removeComponent(oldField); |
|
828 |
|
|
829 |
unbindField(oldField); |
|
830 |
addField(newField, propertyId, column1, row1, column2, row2); |
|
831 |
getViewEventBus().publish(this, new FieldReplaceEvent(this, oldField, newField)); |
|
832 |
return newField; |
|
833 |
} |
|
834 |
|
|
816 | 835 |
} |
Also available in: Unified diff
ref #7338 mode VALIDATE_AGAINST_HIGHER_NAME_PART implemented for specificEpithet