if(!candidacy.getActiveCandidacySituation().canGeneratePass()){
if (!candidacy.getActiveCandidacySituation().getCanGeneratePass()) {
    public ActionForward showCandidacyGeneratePass(ActionMapping mapping,            ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws FenixServiceException, FenixFilterException{        DynaActionForm form = (DynaActionForm) actionForm;        Integer candidacyNumber = (Integer) form.get("candidacyNumber");        Candidacy candidacy = Candidacy.readByCandidacyNumber(candidacyNumber);        if(candidacy == null){            addActionMessage(request, "error.no.candidacy", candidacyNumber.toString());            return prepareGenPass(mapping, actionForm, request, response);        }        if(!candidacy.getActiveCandidacySituation().canGeneratePass()){            addActionMessage(request, "error.enrolmentFee.to.pay", null);            request.setAttribute("payed", "false");        } else {            request.setAttribute("payed", "true");        }                request.setAttribute("candidacy", candidacy);        return mapping.findForward("showCandidacyGeneratePass");            }