Hi Andrea,

Image works with ResourceReferences and doesn't do anything with its model.
If you just want to control a src attribute with a model object, why not use ContextImage?

Sven


On 10/21/2013 11:16 AM, Andrea Del Bene wrote:
Hi,

at the moment is impossible to use Image component with inheritable
models.  Method initModel is overridden to return null and the
constructor that takes in input just the component id is declared as
protected. It would be fine if we could inherit a model object and use
one of its string property to set the src attribute of the <img> tag.
Coudn't we make the protected constructor public and use the default
version of initModel? The comment inside initModel says that the method
is overridden to use "... a simple model, explicitly set, or  use their
tag's src or value attribute". However, if we look at the code of method
LocalizedImageResource.setSrcAttribute, it doesn't seem necessary to
override initModel to achieve this result.

Reply via email to