Hi Jared,

that's similar what I do, but I also call the superclass in constructor. So
here is my code:

qx.Class.define("cms.myDataCellRenderer",
{
        extend : qx.ui.table.cellrenderer.Abstract,
        construct : function() {
                this.base(arguments);
        },
        members :
        {
                _getContentHtml : function(cellInfo)
                {
                        //  return 
qx.html.String.escape(this._formatValue(cellInfo));
                        return cellInfo.value;
                }               
        }
});

Cheers Torsten


Jared Broad wrote:
> 
> Hey! haha I have *no* idea why this works but I went to get a coffee, came
> back and it worked ?!!?!>>...
> Anyway, for the next person to stumble on this issue:
> 
> Code in Main:
>   //Generate Table
>   var pTable = new qx.ui.table.Table(pTableModel);
>   alert('Made table variable');
>   var portfolioRender = new projectfolder.className();
>   alert('Made render variable');
>   pTable.getTableColumnModel().setDataCellRenderer(1, portfolioRender);
>   pTable.getTableColumnModel().setDataCellRenderer(2, portfolioRender);
>   alert('Set render machine');
> 
> Code in projectfolder/className.js:
>   qx.Class.define("projectfolder.className", {
>     extend: qx.ui.table.cellrenderer.Abstract,
>     members: {
>       _getContentHtml : function(cellInfo) {
>             //return qx.html.String.escape(this._formatValue(cellInfo));
>             return cellInfo.value;
>       }
>     }
>   });
> 
> Regards,
> Jared
> 
>  
> 
> Jared Broad wrote:
>> 
>> Hello Westor, 
>> 
>> Could you please copy the entire class definition snippet in? I cant get
>> it working using either of your posts on extending cellrenderer.Abstract. 
>> 
>> As soon as I define "var render = new myProject.myClassRenderer();" the
>> code halts with no debug messages or errors! I cant figure out what is
>> going wrong.
>> 
>> qx.Class.define("myProject.myClassRenderer", {
>>   extend: qx.ui.table.cellrenderer.Abstract,
>>   members: {
>>     _getContentHtml : function() {
>>          //return qx.html.String.escape(this._formatValue(cellInfo));
>>          return cellInfo.value;
>>     }
>>   }
>> });
>> 
>> Thanks
>> 
>> Jared
>> 
>> 
>> 
>> westor wrote:
>>> 
>>> OK, I found it myself: I have to derive from
>>> qx.ui.table.cellrenderer.Abstract instead of
>>> qx.ui.table.cellrenderer.Default
>>>  
>>> 
>>> westor wrote:
>>>> 
>>>> I need html in table cells, and this worked for me in 0.6.6
>>>> Since 0.7 I have problems with update of data in a cell, when I have
>>>> html inside. Maybe, my way is wrong? 
>>>> 
>>>> What I do is 
>>>> extend : qx.ui.table.cellrenderer.Default and overwite
>>>> 
>>>> _getContentHtml : function(cellInfo)
>>>> {
>>>>    //  return qx.html.String.escape(this._formatValue(cellInfo));
>>>>    return cellInfo.value;
>>>> }
>>>> 
>>>> If I fill the table with data, this works well, but if I update a cell
>>>> with a new (HTML-) value, nothing happens.
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html-in-table-cell---update-of-element-tf4156117.html#a11859771
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to