if(!candidacy.getActiveCandidacySituation().canGeneratePass()){
if (!candidacy.getActiveCandidacySituation().getCanGeneratePass()) {
    public ActionForward generatePass(ActionMapping mapping,            ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws FenixServiceException, FenixFilterException, FenixActionException{        DynaActionForm form = (DynaActionForm) actionForm;        Integer candidacyNumber = (Integer) form.get("candidacyNumber");        Candidacy candidacy = Candidacy.readByCandidacyNumber(candidacyNumber);        if(candidacy == null){            throw new FenixActionException("error.invalid.candidacy.number");        }        if(!candidacy.getActiveCandidacySituation().canGeneratePass()){            throw new FenixActionException("error.enrolmentFee.to.pay");        }                String pass = (String) ServiceUtils.executeService(getUserView(request), "GenerateNewPassword", new Object[] {candidacy.getPerson()});        request.setAttribute("password", pass);                         request.setAttribute("candidacy", candidacy);        return mapping.findForward("generatePassword");    }