On Monday, July 16, 2012 10:23:00 PM UTC+2, Brad Leupen wrote:
Hey there,
I'm experimenting with the new 2.5 UIBinder Cell Rendering functionality. So far it's working well except that i can't see a non-sprite way to use images in my template. Am i missing something?
You can use a DataResource and its getSafeUri() method, or pass the result of AbstractImagePrototype#getSafeHtml() as a <ui:with> parameter.
Example using a DataResource:
<ui:data field="img" src="myImage.png" />
…
<img src="{img.getSafeUri}" />
IIRC there's an open issue to make it easier to use an ImageResource in UiBinder without resorting to @sprite or externalizing the AbstractImagePrototype thingy.