form.setHeaderVisible(false);
form.setBorders(false);
form.setBodyBorder(false);
form.setLabelWidth(200);
final CalendarField date = new CalendarField();
date.setFieldLabel(Messages.get("label.scheduled", "Scheduled"));
form.add(date);
Button schedule = new Button(Messages.get("label.scheduleAsBackgroundJob"), new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent event) {
if (date.getValue() == null) {
MessageBox.alert(Messages.get("label.sendNewsletter", "Send newsletter issue"), Messages.get("failure.invalid.date", "Please provide a valid date value"), null);
return;
}
mask();
doSchedule(date.getValue(), n);
}
});
Button now = new Button(Messages.get("label.sendNow"), new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent event) {