} else if (DETAILS.equals(method)) {
try {
//TODO offerGuardian
//prepareDataForSelect(req);
Offer offer = offerService.load(Integer.valueOf(req.getParameter("id")));
OfferGuardianService offerGuardianService=(OfferGuardianService) BusinessUtil
.findBusiness("OfferGuardianService");;
if (offer.getOfferGuardian()!=null) {
OfferGuardian guardian=offerGuardianService.load(offer.getOfferGuardian().getIdOfferGuardian());
req.setAttribute("guardian", guardian.getFirstName()+" "+guardian.getLastName());
} else {
req.setAttribute("guardian", EMPTY);
}
req.setAttribute("id", String.valueOf(offer.getIdOffer()));
req.setAttribute("appointmentsCount", String.valueOf(offer.getAppointmentsCount()));
req.setAttribute("dateFrom", offer.getDatefrom().toString());
req.setAttribute("dateTo", offer.getDateto().toString());
req.setAttribute("registrationDate", offer.getRegistrationDate().toString());
req.setAttribute("appointment", offer.getAppointment());
req.setAttribute("programPlane", offer.getProgramPlane());
req.setAttribute("hoursNumber", String.valueOf(offer.getHoursNumber()));
req.setAttribute("description", offer.getDescription());
if(offer.getPayment()!=null) {
req.setAttribute("payment", offer.getPayment().toString());
} else {
req.setAttribute("payment", EMPTY);
}
} catch (NumberFormatException e) {