if (createReceiptBean.getContributor() == null) { final Contributor contributor = Contributor.readByContributorNumber(Integer .valueOf(createReceiptBean.getContributorNumber())); if (contributor == null) { addActionMessage(request, "error.masterDegreeAdministrativeOffice.payments.receipt.contributor.does.not.exist");  request.setAttribute("personId", createReceiptBean.getPerson().getIdInternal()); return showPaymentsWithoutReceipt(mapping, actionForm, request, response);  } else { createReceiptBean.setContributor(contributor); } }
    public ActionForward confirmCreateReceipt(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) {        final CreateReceiptBean createReceiptBean = (CreateReceiptBean) RenderUtils.getViewState(                "createReceiptBean").getMetaObject().getObject();        if (createReceiptBean.getSelectedEntries().isEmpty()) {            addActionMessage(request,                    "error.masterDegreeAdministrativeOffice.payments.receipt.entries.selection.is.required");            request.setAttribute("personId", createReceiptBean.getPerson().getIdInternal());            return showPaymentsWithoutReceipt(mapping, actionForm, request, response);        }        request.setAttribute("createReceiptBean", createReceiptBean);        return mapping.findForward("confirmCreateReceipt");    }