1

まず、そのようなことをするのは良い習慣ですか?私は自分にとって正しいと思われる方法を試しましたが、成功しませんでした:

public class FormViewImpl extends CompositeView implements HasUiHandlers<C>, FormView {
    public interface SettlementInstructionsSearchFormViewUiBinder extends UiBinder<Widget, SettlementInstructionsSearchFormViewImpl> {}

    @Inject
    static FormViewImpl uiBinder;

    @Inject
    static Provider<DateEditorWidget> dateEditorProvider;

    @UiField(provided = true)
    MyComponent<String> myComp;

    @UiField
    DateEditorWidget effectiveDateFrom;

    // .. other fields

    @Inject
    public FormViewImpl () {
        myComp = new MyComponent<String>("lol");

        if (uiBinder == null)
            uiBinder = GWT.create(SettlementInstructionsSearchFormViewUiBinder.class);

        initWidget(uiBinder.createAndBindUi(this));
    }

    @UiFactory
    DateEditorWidget createDateEditor() {
        return dateEditorProvider.get();
    }
}

引数のないクラス以外に必要なものは何ですか? 私の会社のプロジェクトでは、同じ種類のコードが別の場所で機能します。ここの初心者の高レベルから申し訳ありません...何かポインタがあればいいですね。

ありがとう

4

2 に答える 2