group = new Integer(request.getParameter("group"));
group = new Integer(request.getParameter("groupID"));
    public ActionForward editFirstTimeParkingParty(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {        Integer parkingRequestID = new Integer(request.getParameter("code"));        final ParkingRequest parkingRequest = rootDomainObject.readParkingRequestByOID(parkingRequestID);        String note = request.getParameter("note");        Object args[] = { parkingRequest, null, null, null, note, null, null };        String parkingRequestState = request.getParameter("parkingRequestState");        if (parkingRequestState == null) {            parkingRequestState = "";        }        String parkingPartyClassification = request.getParameter("parkingPartyClassification");        if (parkingPartyClassification == null) {            parkingPartyClassification = "";        }        String personName = request.getParameter("personName");        if (personName == null) {            personName = "";        }        String carPlateNumber = request.getParameter("carPlateNumber");        if (carPlateNumber == null) {            carPlateNumber = "";        }        request.setAttribute("parkingRequestState", parkingRequestState);        request.setAttribute("parkingPartyClassification", parkingPartyClassification);        request.setAttribute("personName", personName);        request.setAttribute("carPlateNumber", carPlateNumber);        DynaActionForm dynaForm = (DynaActionForm) actionForm;        if (!StringUtils.isEmpty((String) dynaForm.get("accepted"))                || request.getParameter("acceptPrint") != null) {            Long cardNumber = null;            Integer group = null;            try {                cardNumber = new Long(request.getParameter("cardNumber"));                if (cardNumber <= 0) {                    saveErrorMessage(request, "cardNumber", "error.number.below.minimum");                    request.setAttribute("idInternal", parkingRequestID);                    return showRequest(mapping, actionForm, request, response);                }            } catch (NullPointerException e) {                saveErrorMessage(request, "cardNumber", "error.requiredCardNumber");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            } catch (NumberFormatException e) {                saveErrorMessage(request, "cardNumber", "error.invalidCardNumber");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            }            try {                group = new Integer(request.getParameter("group"));            } catch (NullPointerException e) {                saveErrorMessage(request, "group", "error.requiredGroup");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            } catch (NumberFormatException e) {                saveErrorMessage(request, "group", "error.invalidGroup");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            }            if (!isValidCardNumber(cardNumber)) {                saveErrorMessage(request, "cardNumber", "error.alreadyExistsCardNumber");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            }            if (!isValidGroup(group)) {                saveErrorMessage(request, "group", "error.invalidGroup");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            }            ParkingPartyBean parkingPartyBean = (ParkingPartyBean) getFactoryObject();            String cardAlwaysValid = dynaForm.getString("cardAlwaysValid");            if (cardAlwaysValid.equalsIgnoreCase("no")                    && (parkingPartyBean.getCardStartDate() == null || parkingPartyBean.getCardEndDate() == null)) {                saveErrorMessage(request, "mustFillInDates", "error.card.mustFillInDates");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            } else if (cardAlwaysValid.equalsIgnoreCase("yes")) {                parkingPartyBean.setCardStartDate(null);                parkingPartyBean.setCardEndDate(null);            }            if (parkingPartyBean.getCardStartDate() != null                    && parkingPartyBean.getCardStartDate().isAfter(parkingPartyBean.getCardEndDate())) {                saveErrorMessage(request, "invalidPeriod", "error.parkingParty.invalidPeriod");                request.setAttribute("idInternal", parkingRequestID);                return showRequest(mapping, actionForm, request, response);            }            args[1] = ParkingRequestState.ACCEPTED;            args[2] = cardNumber;            args[3] = group;            args[5] = parkingPartyBean.getCardStartDate();            args[6] = parkingPartyBean.getCardEndDate();        } else if (request.getParameter("reject") != null) {            args[1] = ParkingRequestState.REJECTED;        } else {            args[1] = ParkingRequestState.PENDING;        }        ServiceUtils.executeService(SessionUtils.getUserView(request), "UpdateParkingParty", args);        if (request.getParameter("acceptPrint") != null) {            request.setAttribute("parkingPartyID", parkingRequest.getParkingParty().getIdInternal());            printParkingCard(mapping, actionForm, request, response);        }        return showParkingRequests(mapping, actionForm, request, response);    }