:: Forum >> Version 2 >>

imagetext.js: this.getContent("box/text").refreshContents is not a function

Hi all,

In /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)
Monday, December 12, 2011
Is
using an 'Image' template
instead of an 'ImageText' template
a valid workaround?
Thierry Nivelet (FoxInCloud)
Monday, December 12, 2011

Post a reply:

Text:
Name:

Back to support forum

Forum search