Hi Geo,

I do something similar in my application and its working fine. Please 
find my comments below.

geo wrote:
> Hello,
>
> I created a Table (in 0.8 version) with a column which using a 
> qx.ui.table.cellrenderer.Boolean and a qx.ui.table.celleditor.CheckBox 
> as editor.
>
> I have 2 problems with this table :
>
> - First I need to double click on the cell (even if it has the focus) to 
>   focus the checkbox inside.
>
>   
My code snippet is :

myTableModel = new qx.ui.table.model.Simple();   //defined table model 
as Simple
.....
this.base(arguments, myTableModel ,
    {
      tableColumnModel : function(obj) {
       return new qx.ui.table.columnmodel.Resize(obj);
      }
    });   //Later, changed the table model to be Resizable

var propertyCellRendererFactory = new 
qx.ui.table.cellrenderer.Dynamic(this.propertyCellRendererFactoryFunc);   
//call to local fn. defined below
var propertyCellEditorFactory = new 
qx.ui.table.celleditor.Dynamic(this.propertyCellEditorFactoryFunc);   
//call to local fn. defined below

columnModel.setDataCellRenderer(1, propertyCellRendererFactory);   //for 
col. no. 2 of table
columnModel.setCellEditorFactory(1, propertyCellEditorFactory);

this.addListener("cellClick",this._onCellClick, this,false );
....
          
propertyCellRendererFactoryFunc : function (cellInfo)
      {
            return new qx.ui.table.cellrenderer.Boolean;
      },

propertyCellEditorFactoryFunc : function (cellInfo)
        {
              return new qx.ui.table.celleditor.CheckBox;
        },
  
_onCellClick : function(e){
    if ( this.getTableModel().getValue(colnum,romnum) === true )
            {
               this.getTableModel().setValue(colnum,romnum,false);
             
            }
            else
            {
        this.getTableModel().setValue(colnum,romnum,true);
            }
}
> - In second time if I modify the checkbox in a cell as long as I let the 
> focus on this cell, I can read the modification in the corresponding 
> dataModel (using getValue(), it always return the old value). To receive 
> the modification of the checkbox I must focus another cell in the table.
>
> I also do a test with attach an "dataEdited" listener on the table, the 
> result is the same as long as I do not focus another cell I do not 
> receive the corresponding "dataEdited" event ...
>
> Is it possible to retrieve the checkBox value even if the related cell 
> keep the focus ?
>
>   
I will try and let you know
> Thanks.
>   

-- 
Amit Rana 
SpagoBI Consultant 
www.eng.it       
www.spagoworld.org


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to