@Override
public EditPanel createPanel(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
EventVO event = (EventVO)attributes.get("event");
EditPanel panel = new EditPanel(Right.CALENDAR_CALENDAR_WRITE, event);
if(event.getId() == null) {
panel.setTitle(MessageUtil.message(request, "module.calendar.event.headLine.create"));
} else {
panel.setTitle(MessageUtil.message(request, "module.calendar.event.headLine.edit", event.getTitle()));
panel.setAttribute(DeleteAction.TEXT_TITLE, MessageUtil.message(request, "module.calendar.event.delete.headLine", event.getTitle()));
panel.setAttribute(DeleteAction.TEXT_QUESTION, MessageUtil.message(request, "module.calendar.event.delete.question", event.getTitle()));
}
boolean contentEditable = isContentEditable(panel, (CalendarVO)attributes.get("calendar"), request);
if(contentEditable) {
panel.addAction(Action.Type.DELETE, "/calendar/event/delete");
}
panel.addAction(Action.Type.SAVE, "/calendar/event/save");
panel.addPage("STANDARD", "/calendar/event/pageStandard", "module.generic.panel.tab.standard", true, contentEditable ? null : Boolean.FALSE);
panel.addPage("PARTICIPIANTS", "/calendar/event/pageParticipiants", "module.calendar.event.pageParticpiants", true, contentEditable ? null : Boolean.FALSE);
panel.addPage("RECURRENCE", "/calendar/event/pageRecurrence", "module.calendar.event.pageRecurrence", true, contentEditable ? null : Boolean.FALSE);
panel.addPage("SYSTEM", "/calendar/event/pageSystem", "module.generic.panel.tab.system");
return panel;
}