Project

General

Profile

« Previous | Next » 

Revision 1ff11053

Added by Andreas Kohlbecker almost 7 years ago

ref #6169 feature completed: adding new type designation workingsets

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItemEditButtonGroup.java
63 63
            addComponents(nameIdButton.getButton(), nameLabel);
64 64
        } else {
65 65
            // no name in the registration! we only show the typified name as label
66
            addComponent(new Label(regDto.getTypifiedName().getLabel()));
66
            if(regDto.getTypifiedName() != null){
67
                addComponent(new Label(regDto.getTypifiedName().getLabel()));
68
            }
67 69
        }
68 70
        if(regDto.getOrderdTypeDesignationWorkingSets() != null){
69 71
            for(TypedEntityReference baseEntityRef : regDto.getOrderdTypeDesignationWorkingSets().keySet()) {
......
90 92
            }
91 93
        }
92 94
        addTypeDesignationButton = new Button(FontAwesome.PLUS);
93
        addTypeDesignationButton.setDescription("Add a new type designation");
95
        addTypeDesignationButton.setDescription("Add a new type designation workingset");
94 96
        addComponent(addTypeDesignationButton);
95 97

  
96 98

  
......
117 119
    @Override
118 120
    protected void addDefaultStyles() {
119 121
        addStyleName(STYLE_NAMES);
120
        nameIdButton.getButton().addStyleName(DEFAULT_BUTTON_STYLES);
122
        if(nameIdButton != null){
123
            nameIdButton.getButton().addStyleName(DEFAULT_BUTTON_STYLES);
124
        }
121 125
        typeDesignationButtons.forEach(idb -> idb.getButton().addStyleName(DEFAULT_BUTTON_STYLES));
122 126
        addTypeDesignationButton.addStyleName(DEFAULT_BUTTON_STYLES);
123 127
    }

Also available in: Unified diff