Project

General

Profile

Revision 06b79df2

ID06b79df2f504001e832078bd928212071f1226cc
Parent 9607cc97
Child eded01b7

Added by Andreas Kohlbecker about 2 years ago

fix #7477 ToManyRelatedEntitiesListSelect remove button always enabled

View differences:

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

Add picture from clipboard (Maximum size: 40 MB)