public void update() {
        if (listBadgeNames.getSelectedValue() == null) {
            return;
        }

        clearErrors();

        if (txtBadgeName.isMessageDefault() || txtBadgeName.getText().isEmpty()) {
            Util.setError(lblNameError, "Advancement name cannot be left blank");
            return;
        }

        for (int i = 0; i < listBadgeNames.getModel().getSize(); ++i) {
            String advancementName = (String) listBadgeNames.getModel().getElementAt(i);
            if (advancementName.equalsIgnoreCase(txtBadgeName.getText()) && !txtBadgeName.getText().equals(listBadgeNames.getSelectedValue().toString())) {
                Util.setError(lblNameError, "Advancement name already exists");
                return;
            }
        }

        Advancement advancement = LogicAdvancement.findByName(listBadgeNames.getSelectedValue().toString());
        if (advancement == null) {
            return;
        }

        if (txtImagePath.isMessageDefault()) {
            advancement.setImgPath("");
        } else {
            advancement.setImgPath(txtImagePath.getText());
        }
        advancement.setName(txtBadgeName.getText());

        List<Requirement> requirementList = validateRequirements(advancement.getId());
        if (requirementList == null) return;


        Util.processBusy(pnlBadgeConf.getBtnUpdate(), true);
        // when editing requirements may need to check who is using them
        LogicRequirement.updateList(requirementList, advancement.getId(), RequirementTypeConst.ADVANCEMENT.getId());
        LogicAdvancement.update(advancement);
        Util.processBusy(pnlBadgeConf.getBtnUpdate(), false);

        reloadData();
    }