imagetext.js: this.getContent("box/text").refreshContents is not a function
Hi all,
In http://www.activewidgets.com/javascript.forum.21494.2/imagetext-template-error-refreshcontents-is.html, Alax advises to use:
instead of
use
If I do that and later bind the cell to a dataSource containing image URL, cell attempts to display image URL so I see '...' instead of image.
What workaround can I use?
My complete code is
where '<<' and '>>' are server-side substitution delimiters
In http://www.activewidgets.com/javascript.forum.21494.2/imagetext-template-error-refreshcontents-is.html, Alax advises to use:
instead of
cellTemplate.setContent('box/text', '');
cellTemplate.setContent('box/image', new AW.HTML.IMG);
use
cellTemplate.setContent('box/image', new AW.HTML.IMG);
...
grid.setCellText("", columnIndex);
If I do that and later bind the cell to a dataSource containing image URL, cell attempts to display image URL so I see '...' instead of image.
What workaround can I use?
My complete code is
var ctp = AW.Templates.ImageText.subclass();
ctp.create = function(){
var image = new AW.HTML.IMG;
image.setAttribute('src', function(){
return this.getControlProperty('text') || '<<this.cImageWebAddr(m.toControl.Picture)>>';
});
var obj = this.prototype;
obj.setContent('box/text', ' ');
obj.setContent('box/image', image);
};
setCellTemplate(new ctp, <<m.tcCol>>);
where '<<' and '>>' are server-side substitution delimiters
Thierry Nivelet (FoxInCloud)
December 12,