if (!buttonPressed.equals("submit_identifier_remove_" + i))
if (!buttonPressed.equals("submit_identifier_remove_" + i) && !thisVal.equals(""))
    private void processEditMetadataOne(Context context,        HttpServletRequest request,        HttpServletResponse response,        SubmissionInfo subInfo)        throws ServletException, IOException, SQLException, AuthorizeException    {        String buttonPressed = UIUtil.getSubmitButton(request, "submit_next");        // Firstly, check for a click of the cancel button.        if (buttonPressed.equals("submit_cancel"))        {            doCancellation(request,                response,                subInfo,                EDIT_METADATA_1,                EDIT_METADATA_1);            return;        }        Item item = subInfo.submission.getItem();        // Update the item metadata.        readNames(request, item, "contributor", "author", true);        readText(request, item, "title", null, false, "en");        if (subInfo.submission.hasMultipleTitles())        {            readText(request, item, "title", "alternative", true, "en");        }        if (subInfo.submission.isPublishedBefore())        {            readDate(request, item, "date", "issued");        }        readSeriesNumbers(request, item, "relation", "ispartofseries", true);        // FIXME: Maybe should do integrity check using language object        readText(request, item, "language", "iso", false, null);        // Identifiers - A special case so do this here        // First, remove existing identifiers.        subInfo.submission.getItem().clearDC("identifier", Item.ANY, Item.ANY);        // Get qualifiers and values        List quals = getRepeatedParameter(request, "identifier_qualifier");        List vals = getRepeatedParameter(request, "identifier_value");        // Add to item DC        for (int i = 0; i<vals.size(); i++)        {            String thisQual = (String) quals.get(i);            String thisVal = (String) vals.get(i);            if (!buttonPressed.equals("submit_identifier_remove_" + i))            {                item.addDC("identifier", thisQual, null, thisVal);            }        }        int nextStep = -1;        // Proceed according to button pressed        if (buttonPressed.equals("submit_contributor_author_more"))        {            // "Add more" clicked for authors            subInfo.moreBoxesFor = "contributor_author";            subInfo.jumpToField = "contributor_author";            nextStep = EDIT_METADATA_1;        }        else if (subInfo.submission.hasMultipleTitles() &&            buttonPressed.equals("submit_title_alternative_more"))        {            // "Add more" clicked for alternative titles            subInfo.moreBoxesFor = "title_alternative";            subInfo.jumpToField = "title_alternative";            nextStep = EDIT_METADATA_1;        }        else if (buttonPressed.equals("submit_relation_ispartofseries_more"))        {            // "Add more" clicked for series/number            subInfo.moreBoxesFor = "relation_ispartofseries";            subInfo.jumpToField = "relation_ispartofseries";            nextStep = EDIT_METADATA_1;        }        else if (buttonPressed.equals("submit_identifier_more"))        {            // "Add more" clicked for identifier            subInfo.moreBoxesFor = "identifier";            subInfo.jumpToField = "identifier";            nextStep = EDIT_METADATA_1;        }        else if (buttonPressed.equals("submit_prev"))        {            nextStep = INITIAL_QUESTIONS;        }        else if (buttonPressed.equals("submit_next"))        {            userHasReached(subInfo, EDIT_METADATA_2);            nextStep = EDIT_METADATA_2;        }        else if (buttonPressed.indexOf("remove") > -1)        {            // Remove button pressed - stay with same form            nextStep = EDIT_METADATA_1;        }        // Write changes to database        subInfo.submission.update();        if (nextStep != -1)        {            doStep(context, request, response, subInfo, nextStep);        }        else        {            doStepJump(context, request, response, subInfo);        }        context.complete();    }