@Override
protected void onSubmit(AjaxRequestTarget target) {
PrivateMessage p = getModelObject();
p.setInserted(new Date());
if (p.isBookedRoom()) {
Room r = p.getRoom();
r.setName(p.getSubject());
r.setComment("");
r.setNumberOfPartizipants(100L);
r.setAppointment(true);
r.setAllowUserQuestions(true);
r.setAllowFontStyles(true);
getBean(RoomDao.class).update(r, getUserId());
} else {
p.setRoom(null);
}
PrivateMessagesDao msgDao = getBean(PrivateMessagesDao.class);