【发布时间】:2011-08-01 22:11:03
【问题描述】:
我想在我的项目中使用 GWT 的 Editor Framework。
在我的视图(实现编辑器)中,我有我的 UiBinder 字段:
@UiField
TextBox text;
在我的 Presenter 中,我通过 GIN 注入驱动程序实例:
@Inject
public AppointmentPopupPresenter(EventBus eventBus, MyView view, final AppointmentDriver appointmentDriver)
当演示者被调用时,我尝试使用以下命令初始化驱动程序:
this.appointmentDriver.initialize(getView());
this.appointmentDriver.edit(new Appointment());
GIN 模块:
bind(SimpleBeanEditorDriver.class).to(AppointmentDriver.class);
AppointmentDriver 接口:
public interface AppointmentDriver extends SimpleBeanEditorDriver<Appointment, AppointmentPopupPresenter.MyView>{
}
稍后当我听到我调用的按钮事件时:
appointmentDriver.flush();
但是所有属性都是空的并且没有错误消息被抛出。如果我在调试器中查看文本框小部件,“编辑器”的实例也为空。不知道internas,但也许这对你来说是一个提示。
约会POJO(当然用void setText(String text)/String getText()):
String text;
目前我完全陷入困境,所以任何帮助都非常受欢迎。
谢谢!!
【问题讨论】:
标签: gwt gwt-editors