detailContainer.add(detailDecorator);
if (appt.getLocation() != null
&& !appt.getLocation().isEmpty()) {
AbsolutePanel whereRow = new AbsolutePanel();
InlineLabel whereHeader = new InlineLabel("Where: ");
whereHeader.setStyleName("detailHeader");
whereRow.add(whereHeader);
whereRow.add(new InlineLabel(appt.getLocation()));
detailDecorator.add(whereRow);
}
if (appt.getCreatedBy() != null
&& !appt.getCreatedBy().isEmpty()) {
AbsolutePanel creatorRow = new AbsolutePanel();
InlineLabel creatorHeader = new InlineLabel("Creator: ");
creatorHeader.setStyleName("detailHeader");
creatorRow.add(creatorHeader);
creatorRow.add(new InlineLabel(appt.getCreatedBy()));
detailDecorator.add(creatorRow);
}
if (appt.getAttendees() != null
&& !appt.getAttendees().isEmpty()) {
AbsolutePanel whoRow = new AbsolutePanel();
InlineLabel whoHeader = new InlineLabel("Who: ");
whoHeader.setStyleName("detailHeader");
whoRow.add(whoHeader);
for (int a = 0; a < appt.getAttendees().size(); a++) {
Attendee attendee = appt.getAttendees().get(a);
String comma = (a < appt.getAttendees().size() - 1) ? ", "
: "";
String labelText = attendee.getEmail() + comma;
whoRow.add(new InlineLabel(labelText));
}
detailDecorator.add(whoRow);
}