Object command, Errors errors, int page) throws Exception {
Map map = new HashMap();
BookingFrontendDTO booking = (BookingFrontendDTO)command;
if(page==0){
CriteriaDTO criteria =(CriteriaDTO)req.getSession().getAttribute("dto");
createBookingFromCriteria(booking, criteria);
Collection structuresCollection = structureManager.searchAll("city", criteria.getDestinazione());
map.put("structures", structuresCollection);
}
if(page==1){
CriteriaDTO criteria =(CriteriaDTO)req.getSession().getAttribute("dto");
createBookingFromCriteria(booking, criteria);
Structure structure = (Structure) structureManager.get(booking.getStructure().getId());
map.put("result", bookingManager.getSolutionsForStructureFromCriteria(criteria,booking.getStructure(),booking.getBeginDate(),booking.getFinishDate()));
map.put("structure", structure);