对于为PlaceHistoryMapper生成的类进行硬编码以使用AbstractPlaceHistoryMapper作为超类,看起来像是这样。GWT:使用延迟绑定将自定义映射器替换为AbstractPlaceHistoryMapper
因此,我试图通过尝试用我的自定义映射器替换此AbstractPlaceHistoryMapper使用延迟绑定来解决此问题。我在* .gwt.xml中使用以下规则:
<replace-with class="com.google.gwt.place.impl.AbstractPlaceHistoryMapper">
<when-type-is class="com.test.sampleapp.CustomPlaceHistoryMapper" />
</replace-with>
但由于某种原因,替换似乎没有发生。 CustomPlaceHistoryMapper不会被踢入,并且生成的类仍然使用AbstractPlaceHistoryMapper。
任何想法/指针可能会导致这种行为非常感谢。
注:我也发布了这个GWT组,但迄今没有收到答案。
我认为希尔布兰德的回答是正确的。 GWT.create(X)表示只有'X'通过“延迟绑定”。如果生成的类'X'扩展了任何类,它们(扩展类)将不会通过“延迟绑定”进程。 – 2011-02-15 23:02:51