/**
* {@inheritDoc}
*/
public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException {
Image image = (Image) w;
String snippet = (image.getChildren().size() > 0) ?
getSnippet("image_link") : getSnippet("image");
if(image.getRefresh()>0) {
snippet = StringUtils.replace(snippet, "%setrefresh%", "<script type=\"text/javascript\">imagesToRefreshOnPage=1</script>");
snippet = StringUtils.replace(snippet, "%refresh%", "id=\"%id%\" onload=\"setTimeout('reloadImage(\\'%url%\\', \\'%id%\\')', " + image.getRefresh() + ")\"");
} else {
snippet = StringUtils.replace(snippet, "%setrefresh%", "");
snippet = StringUtils.replace(snippet, "%refresh%", "");
}