From 05445cbeb64c663088ccef8979f595ebf241d9f2 Mon Sep 17 00:00:00 2001 From: Josefina Revilla Date: Mon, 31 Jul 2017 15:30:03 -0300 Subject: [PATCH] QIEntityView: added method for building and binding DateFields --- .../qi-core/src/main/java/org/jpos/qi/QIEntityView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java b/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java index f2ad12ec41..7082e9b7fe 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/QIEntityView.java @@ -19,6 +19,7 @@ package org.jpos.qi; import com.vaadin.data.*; +import com.vaadin.data.converter.LocalDateToDateConverter; import com.vaadin.data.converter.StringToBigDecimalConverter; import com.vaadin.data.converter.StringToIntegerConverter; import com.vaadin.data.converter.StringToLongConverter; @@ -542,6 +543,13 @@ protected TextField buildAndBindTimestampField(String id) { return field; } + protected DateField buildAndBindDateField(String id) { + DateField dateField = new DateField(getCaptionFromId(id)); + Binder.BindingBuilder builder = formatField(id,dateField); + builder.withConverter(new LocalDateToDateConverter()).bind(id); + return dateField; + } + protected TextField buildAndBindBigDecimalField(String id) { TextField field = new TextField(getCaptionFromId(id)); Binder.BindingBuilder builder = formatField(id,field);