【发布时间】:2017-10-14 14:03:04
【问题描述】:
我有一个实现 PropertyBusinessObject 的类。该类的属性之一是 Date,如图所示:
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:对于输入字符串:“Thu Oct 12 20:21:20 CAT 2017”
- 在四处挖掘之后,我知道我应该以某种方式使用 DateConverter,但是没有足够的信息来说明如何使用它。
【问题讨论】:
-
你想绑定哪个 UI 元素?我们通常将日期绑定到选择器。还有什么是异常的完整堆栈跟踪?
-
谢谢谢。我绑定到一个 TextField,但是当我切换到一个选择器时,一切都按预期工作。
标签: codenameone