Project

General

Profile

« Previous | Next » 

Revision 2ffe661a

Added by Andreas Kohlbecker almost 6 years ago

minor refactoring to clarify code

View differences:

src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
408 408
            if(withEditButton){
409 409
                addButtonIndex++;
410 410
                // edit
411
                ((Button)buttonGroup.getComponent(0)).setDescription(field.getValue() == null ? "New" : "Edit");
412
                buttonGroup.getComponent(0).setEnabled(field.getValue() == null
411
                Button editCreateButton = ((Button)buttonGroup.getComponent(0));
412
                editCreateButton.setDescription(field.getValue() == null ? "New" : "Edit");
413
                editCreateButton.setEnabled(field.getValue() == null
413 414
                        || field.getValue() != null && testEditButtonPermission(field.getValue()));
414 415
            }
415 416
            // add

Also available in: Unified diff