protected void setup() {
BeanItem<Range> bi = new BeanItem<Range>(range);
range.setFrom(new Date(2011 - 1900, 12 - 1, 4));
range.setTo(new Date(2011 - 1900, 12 - 1, 15));
PopupDateField fromField = createDateField();
fromField.setPropertyDataSource(bi.getItemProperty("from"));
CheckBox fromInclusive = new CheckBox("From inclusive",
bi.getItemProperty("fromInclusive"));
CheckBox toInclusive = new CheckBox("To inclusive",
bi.getItemProperty("toInclusive"));
fromInclusive.setImmediate(true);
fromInclusive.addListener(refreshField);
toInclusive.setImmediate(true);
toInclusive.addListener(refreshField);
PopupDateField toField = createDateField();
toField.setPropertyDataSource(bi.getItemProperty("to"));
actualDateField = createDateField();
actualDateField.setValue(new Date(2011 - 1900, 12 - 1, 1));
actualDateField.addValidator(new RangeValidator<Date>("", Date.class,
null, null) {