2017-10-12 59 views
1

我有一個實現類的屬性的PropertyBusinessObject.One一類是如圖所示的日期:UiBinding.Binding返回NumberFormatException異常的日期

public class Appointment implements PropertyBusinessObject { 
public final Property<Double, Appointment> id = new Property<>("id"); 
public final Property<Date, Appointment> bookDate = 
       new Property<> "bookDate", Date.class); 

...

當我嘗試和使用在形式UiBinding如下:

Appointment a = (Appointment) obj; 
    for (UiBinding.Binding b : bindingList) { 
     b.commit();   
    } 

...

我得到的java.lang。 NumberFormatException的:對於輸入字符串:「週四10月12日20時21分二十秒CAT 2017年」

  1. 周圍挖掘後,我知道我應該以某種方式使用DateConverter,但不是我該如何使用這個足夠的信息。
+0

你想綁定什麼UI元素?我們通常將日期綁定到選擇器。還有什麼是異常的完整堆棧跟蹤? –

+0

謝謝謝。我綁定到一個TextField,但是當我切換到一個選擇器時,一切都按預期工作。 – Rootsman

回答

0

現在只有日期映射到選取器。我們可能想要增強它以支持文本字段SimpleDateFormat或類似的東西,但現在不可用。