(provide=true)在GWT中做什么?
在xml文件中,我有一些字段,如:(provide=true)在GWT中做什么?,gwt,Gwt,在xml文件中,我有一些字段,如: <ui:with field="f1" type="t1"/> 这样我的项目就不会失败。那么在GWT中provide=true做什么呢?为什么我们需要在Jave文件中手动写入provided=true?提供的参数表示字段的小部件不能由UIBinder创建,而是由您的代码提供 @UIField Button btnUIbinder; @UIField(provided=true) Button btnYourCode; public YourCl
<ui:with field="f1" type="t1"/>
这样我的项目就不会失败。那么在GWT中provide=true做什么呢?为什么我们需要在Jave文件中手动写入provided=true?提供的参数表示字段的小部件不能由UIBinder创建,而是由您的代码提供
@UIField Button btnUIbinder;
@UIField(provided=true) Button btnYourCode;
public YourClassConstructor() {
btnYourCode = new Button(...); // required!
// init uibinder here
}
提供的关键字支持具有复杂创建过程的小部件。或者,您已经从另一个源获得了小部件的情况
@UIField Button btnUIbinder;
@UIField(provided=true) Button btnYourCode;
public YourClassConstructor() {
btnYourCode = new Button(...); // required!
// init uibinder here
}