use of org.apache.openmeetings.web.user.rooms.RoomEnterBehavior in project openmeetings by apache.
the class MessagesContactsPanel method selectMessage.
private void selectMessage(long id, AjaxRequestTarget target) {
PrivateMessage msg = msgDao.get(id);
selectedMessage.addOrReplace(new Label("from", msg == null ? "" : getEmail(msg.getFrom())));
selectedMessage.addOrReplace(new Label("to", msg == null ? "" : getEmail(msg.getTo())));
selectedMessage.addOrReplace(new Label("subj", msg == null ? "" : msg.getSubject()));
selectedMessage.addOrReplace(new Label("body", msg == null ? "" : msg.getMessage()).setEscapeModelStrings(false));
if (msg != null) {
Room r = msg.getRoom();
if (r != null) {
Appointment a = apptDao.getByRoom(r.getId());
roomContainer.addOrReplace(new Label("start", a == null ? "" : getDateFormat().format(a.getStart())));
roomContainer.addOrReplace(new Label("end", a == null ? "" : getDateFormat().format(a.getEnd())));
roomContainer.addOrReplace(new Button("enter").add(new RoomEnterBehavior(r.getId())));
}
roomContainer.setVisible(r != null);
}
if (target != null) {
target.add(selectedMessage);
updateControls(target);
}
}
Aggregations