DynaActionForm parkingForm = (DynaActionForm) actionForm; if (parkingParty.getFirstRequest() != null && parkingParty.getFirstRequest().getFirstCarPropertyRegistryFileName() != null) { parkingForm.set("ownVehicle1", false); } else { parkingForm.set("ownVehicle1", true); } if (parkingParty.getFirstRequest() != null && parkingParty.getFirstRequest().getSecondCarPropertyRegistryFileName() != null) { parkingForm.set("ownVehicle2", false); } else { parkingForm.set("ownVehicle2", true); }
prepareRadioButtonsForm(actionForm, parkingParty);
    public ActionForward prepareEditParking(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {        IUserView userView = SessionUtils.getUserView(request);        ParkingParty parkingParty = userView.getPerson().getParkingParty();        request.setAttribute("parkingParty", parkingParty);        if (parkingParty.getParkingRequestsSet().isEmpty()) {            if (request.getAttribute("parkingRequestFactoryCreator") == null) {                request.setAttribute("parkingRequestFactoryCreator", parkingParty.getParkingRequestFactoryCreator());            }        } else {            if (request.getAttribute("parkingRequestFactoryEditor") == null) {                request.setAttribute("parkingRequestFactoryEditor", parkingParty.getFirstRequest().getParkingRequestFactoryEditor());            }        }        DynaActionForm parkingForm = (DynaActionForm) actionForm;                if (parkingParty.getFirstRequest() != null                && parkingParty.getFirstRequest().getFirstCarPropertyRegistryFileName() != null) {            parkingForm.set("ownVehicle1", false);        } else {            parkingForm.set("ownVehicle1", true);        }        if (parkingParty.getFirstRequest() != null                && parkingParty.getFirstRequest().getSecondCarPropertyRegistryFileName() != null) {            parkingForm.set("ownVehicle2", false);        } else {            parkingForm.set("ownVehicle2", true);        }        return mapping.findForward("editParkingRequest");    }