4

When GWT UIBinder being used by default, a pair of java source and UI template files are created under the same directory.

What are required to keep them under separate directories. e.g client/MyApp.java and client/ui/xml/MyApp.ui.xml?

@EDIT

Below is based on@jonasr's answer, but the annotaion should be valued with rather the file path of the UI template than the package prefix.

@UiTemplate("ui/xml/MyApp.ui.xml")
interface MyAppUiBinder extends UiBinder<Widget, MyApp>
{}
4

1 回答 1

5

尝试在接口声明中使用带有完整路径的 @UiTemplate 注释来为您的 ui.xml 文件添加注释

@UiTemplate("com.company.ui.xml.MyApp.ui.xml")
interface MyAppUiBinder extends UiBinder<Widget, MyApp>
{}
于 2012-06-13T12:18:29.873 回答