大規模な GWT 2.2.0 アプリケーションでは、動的 CellTable を使用したいと考えています。他のウィジェットとは異なり、CellTable は css スタイルに標準的な名前を使用しません (「gwt-MenuItem」など)。したがって、標準の css から CssResource に移行する必要があります。これには、次のように標準の「gwt-」スタイルも含める必要があります。
public interface IPreferences
{
public interface MyCssResource extends CssResource
{
String content();
...
}
@ImportedWithPrefix("gwt")
public interface GwtCss extends CssResource
{
String MenuItem();
String MenuBar();
String TabLayoutPanelTab();
}
...
public interface MyResources extends ClientBundle
{
public static final MyResources INSTANCE = GWT.create(MyResources.class);
@Source("preferences.css")
@Import(GwtCss.class) <--- any imported interface will produce error
MyCssResource cssStd();
}
}
これはホスト モードで正常に動作し、Eclipse を使用してコンパイルできますが、ant を使用してコンパイルすることはできません。
<target name="gwtc" depends="compile" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<pathelement location="gwt-servlet.jar"/>
<pathelement location="gwt-dev.jar"/>
<pathelement location="gwt-user.jar"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg line="-war"/>
<arg value="war"/>
<arg value="...module.file"/>
</java>
</target>
[java] [ERROR] Annotation error: cannot resolve ...IPreferences$GwtCss
[java] java.lang.ClassNotFoundException: ...IPreferences$GwtCss
これを日食以外でコンパイルするために何をしなければならないかについてのヒントが見つかりませんでした。コメントありがとうございます。