You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DateFieldBasedOnLong.java 777B

123456789101112131415161718192021222324252627
  1. package com.vaadin.tests.components.abstractfield;
  2. import java.util.Date;
  3. import com.vaadin.ui.Button;
  4. import com.vaadin.v7.data.util.ObjectProperty;
  5. import com.vaadin.v7.ui.PopupDateField;
  6. public class DateFieldBasedOnLong extends AbstractComponentDataBindingTest {
  7. private Long l = null;
  8. private ObjectProperty<Long> property;
  9. @Override
  10. protected void createFields() {
  11. PopupDateField pdf = new PopupDateField("DateField");
  12. addComponent(pdf);
  13. property = new ObjectProperty<>(l, Long.class);
  14. pdf.setPropertyDataSource(property);
  15. property.setValue(new Date(2011 - 1900, 4, 6).getTime());
  16. addComponent(new Button("Set property value to 10000L",
  17. event -> property.setValue(10000L)));
  18. }
  19. }