|
Skar, the __labels hash should be keyed by the values, e.g. : { "M":"Male", "F":"Female" } same for the __icons, e.g. : { "M":"male.png", "F":"female.png" } Or you could even have a single structure, e.g. __labelsAndIcons: { "M":["Male", "male.png"], "F":["Female", "female.png"] } Then the decision is made in the overriden _getContentHtml(cellInfo) method, inherited from the qx.ui.table.cellrenderer.Default renderer, based on the cellInfo.value that contains the actual cell value ("M" or "F"), performing the look up your renderer hashe(s), e.g. : _getContentHtml : function(cellInfo) { return this.__getImgHtml(cellInfo) + (this.__labels[cellInfo.value]||""); }, __getImgHtml : function(cellInfo) { var rIcon = this.__icons[cellInfo.value]; if(rIcon) { var w = 12; var h = 12; if(rIcon.getDimension()) { w = rIcon.getDimension().getWidth(); h = rIcon.getDimension().getHeight(); } var css = qx.bom.element.Style.compile({ position : "relative", width : w + "px", height : h + "px", "margin-right" : "3px", "vertical-align" : "middle" }); return '<img src="" style="' + css + '"/>'; } return ""; } I hope I made it clearer ;-) Best, Vincent skar a écrit : Vincent Vandenschrick wrote: -- Vincent Vandenschrick Jspresso Framework http://www.jspresso.org |
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
