我正在尝试在 GWT 中使用编辑器框架,以便我可以让多个编辑器编辑同一个 bean(每个编辑器编辑一个不相交的字段子集)。
这大概是我所拥有的:
class EventEditor implements Editor<MajorEvent> {
// Dispatch to a sub editor.
// Later there will be multiple such sub editors with different types,
// but all implementing Editor<MajorEvent>.
@Path("")
public GenSubEditor genSubEditor() {
return genPresenter.getView().getSubEditor();
}
}
public class GenSubEditor implements Editor<MajorEvent> {
Editor<String> nameEditor() {
return endDate;
}
}
这是 GWT 编译器给我的错误:
The type `GenSubEditor` is assignable to the raw Editor type, but a type parameterization is required.
如果我在方法中替换GenSubEditor
为,编译器不会抱怨。但是似乎驱动程序生成器没有解析我的子编辑器并且从未找到。所以这不是一个解决方案,或者这意味着我做错了什么。Editor<MajorEvent>
genSubEditor
nameEditor
希望有人可以提供帮助。我没有提供 SSCCE,因为我实际上不知道如何创建存根 gwt 演示者/视图,但如果有人告诉我该怎么做,我会很高兴。