@Override protected void printBlock(StringBuffer result, int firstEventMarker, Block block) { AbstractRaplaBlock raplaBlock = (AbstractRaplaBlock) block; // get Appointment for ID AppointmentImpl curAppointment = ((AppointmentImpl) raplaBlock.getAppointment()); // Remove the org.rapla we don't need them for GET-Parameter String appointmendId = ((RefEntity<?>) curAppointment) .getId() .toString() .replace("org.rapla.entities.domain.Appointment", ""); String reservationId = ((RefEntity<?>) (curAppointment.getReservation())) .getId() .toString() .replace("org.rapla.entities.domain.Reservation_", ""); RaplaContext raplaContext = raplaBlock.getBuildContext().getServiceManager(); String curUrl; try { curUrl = raplaContext.lookup(HTMLMobileWeekViewPage.URL_KEY); } catch (RaplaContextException e) { throw new IllegalStateException(e.getMessage()); } // result.append("<div class=\"event_block\"" + firstEventMarker + ">"); String blockDetailUrl = curUrl + "&detail=" + reservationId + appointmendId; result.append("<a href=\"" + blockDetailUrl + "\">"); result.append(block.toString()); result.append("</a>\n"); // result.append("</td>"); // build ID-String for detail view. Example string: detail=RESERVATIONID_APPOINTMENTID }