0
我有一個名爲SignUpBean豆,它的編輯是SignUpBeanEditor和下面是它的驅動器接口。GWT編輯框工作不工作
public interface SignUpDriver extends SimpleBeanEditorDriver<SignUpBean, SignUpEditor>{
}
以下是入口點類
public class Signup implements EntryPoint {
private SignUpDriver signUpDriver;
private SignUpEditor signUpEditor;
private SignUpBean signUpBean;
private VerticalPanel verticalPanel;
private Label signUpLbl;
private Button submitButton;
private Button cancelButton;
private RequestBuilder requestBuilder;
final SignUpConverter signUpConverter=GWT.create(SignUpConverter.class);
public void onModuleLoad() {
signUpLbl = new Label("Sign Up");
signUpDriver = GWT.create(SignUpDriver.class);
signUpBean = new SignUpBean();
signUpEditor = new SignUpEditor();
submitButton = new Button("Submit");
cancelButton = new Button("Cancel");
signUpDriver.initialize(signUpEditor);
signUpDriver.edit(signUpBean);
System.out.println(signUpBean.getUserName());
submitButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SignUpBean signUpBeanEdited=signUpDriver.flush();
}
}
}
}
我在UI給值後,正從signUpBeanEdited
只有空值。如果我使用構造函數初始化SignUpBean
,那麼數據也不會綁定到UI。我的問題是我不能使用編輯器框架在GWT UI中綁定數據。
請列出'SignUpEditor'和'SignUpBean' - 你有什麼到目前爲止似乎是有道理的,但需要更多的上下文的類。 – 2013-02-22 18:20:24