Closed GoogleCodeExporter closed 9 years ago
If I do this inside my View the form get's filled. But this shouldn't be the
way it's meant to be:
public class MyViewPage extends ViewWithUiHandlers<MyUiHandlers> implements
MyPresenter.MyView {
private static MyViewUiBinder uiBinder = GWT.create(MyViewUiBinder.class);
interface MyViewUiBinder extends UiBinder<Widget, MyViewPage> {}
public final Widget widget;
@UiField ValueBoxEditorDecorator<Long> id;
@UiField ValueBoxEditorDecorator<String> username;
@UiField ValueBoxEditorDecorator<String> password;
interface Driver extends SimpleBeanEditorDriver<MyModel, MyViewPage> {}
private Driver editorDriver;
public MyViewPage() {
widget = uiBinder.createAndBindUi(this);
MyModel m = new MyModel();
m.setId(1L);
m.setUsername("username");
m.setPassword("password");
editorDriver = GWT.create(Driver.class);
editorDriver.initialize(this);
editorDriver.edit(m);
}
@Override
public Widget asWidget() {
return widget;
}
}
Original comment by hnsh...@googlemail.com
on 21 May 2012 at 8:52
This is not a GWTP problem. The editor framework won't work with an interface
since it's using reflection at compile time to create the data binding
accessors on the fields.
If your interface doesn't know about the fields, the editor framework won't
know either.
Original comment by christia...@arcbees.com
on 23 May 2012 at 2:18
Original comment by goudreau...@gmail.com
on 23 May 2012 at 2:19
Take a look:
https://github.com/gwtbootstrap/gwt-bootstrap/issues/82#issuecomment-5354194
Original comment by caarlos0
on 24 May 2012 at 8:59
Original issue reported on code.google.com by
hnsh...@googlemail.com
on 21 May 2012 at 8:19