Revision 06b79df2
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java | ||
---|---|---|
417 | 417 |
// add |
418 | 418 |
buttonGroup.getComponent(addButtonIndex).setEnabled(isLast || isOrderedCollection); |
419 | 419 |
// remove |
420 |
buttonGroup.getComponent(addButtonIndex + 1).setEnabled(field.getValue() != null); |
|
420 |
// can be always true, removing the last entry causes an new empty entry to be added. |
|
421 |
buttonGroup.getComponent(addButtonIndex + 1).setEnabled(true); |
|
421 | 422 |
// up |
422 | 423 |
if(isOrderedCollection && buttonGroup.getComponentCount() > addButtonIndex + 2){ |
423 | 424 |
buttonGroup.getComponent(addButtonIndex + 2).setEnabled(!isFirst); |
Also available in: Unified diff
fix #7477 ToManyRelatedEntitiesListSelect remove button always enabled