Java 将图像添加为托管资源(Ui绑定器)时出错
我试图在UiBinder Gwt中添加一个映像作为托管资源,但在“元素my only contain one child Element”行中出现错误 如何修改代码以克服错误 这是我的xml文件Java 将图像添加为托管资源(Ui绑定器)时出错,java,gwt,uibinder,Java,Gwt,Uibinder,我试图在UiBinder Gwt中添加一个映像作为托管资源,但在“元素my only contain one child Element”行中出现错误 如何修改代码以克服错误 这是我的xml文件 <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> 不能将外部ClientBundle中定义的ui:style和ImageResource混合使用。要在ui:style中使用@sprite,必须使用u
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
不能将外部
ClientBundle
中定义的ui:style
和ImageResource
混合使用。要在ui:style
中使用@sprite
,必须使用ui:image
元素定义ImageResource
<ui:image field="requiredImage" src="images/required_indicator.gif" />
问题是,如果我像这样添加图像,它会在页面上出现两次。我只希望图像在网格中出现一次。是否有方法添加图像,以便我可以将其视为网格中的第二列,然后向其添加功能?
public interface myResources extends ClientBundle{
@Source ("images/required_indicator.gif")
ImageResource requiredImage();
<ui:image field="requiredImage" src="images/required_indicator.gif" />