我想通过使用 ID 和资源包动态更改图像。
Element changedImage;
 /* imageID is the Id for the previous image */
 changedImage = Document.get().getElementById("imageId");
 /* And myImageBundle is the resource Bundle and icon the new image*/
 changedImage.setInnerHTML(myImageBundle.icon().getHTML());
但什么也没有发生,它是相同的图像。我错过了什么 ?
非常感谢您的回答或建议。
- - - - 解决方案 - - - - - - - -
我找到了一个解决方案,它工作正常,但不知何故我认为它不是最好的。一切都在下一个功能上:
    private void switchImage(  AbstractImagePrototype imageBundled) {
    String newStyleFromImageBundle, value;
    value = "style=";
    newStyleFromImageBundle = extractStyle(value ,imageBundled.getHTML());
    Element e = Document.get().getElementById("imageHeaderLogo");       
    // removing the current style
    e.removeAttribute("style");     
    // setting the new style with the  previous one retrieved from the image bundled's html
    e.setAttribute("style",newStyleFromImageBundle );
}
希望它有所帮助,请随时告诉是否有更好的方法来做到这一点,或者这是你见过的最糟糕的.. :-)。