Hi list,

 

I guess there is a bug in the qx.ui.table.celleditor.ComboBox.

 

You can see it in the online-demo 
http://demo.qooxdoo.org/current/demobrowser/#test~Table_CellEditor_1.html

 

The Problem:

-          Open the list of the combobox inside a table-cell.

-          Select an item àlist is closed and item is selected àok

-          Then open the list again and don't select any entry

-          Click somewhere to close the combobox-list.

-          The value of the combobox is now empty but it should be still the 
selected value from the first selection.

 

The problem is in the qx.ui.table.celleditor.ComboBox.js:

 

Here is some code from the file qx.ui.table.celleditor.ComboBox.js :

 

    getCellEditorValue : function(cellEditor)

    {

      var value;

      if (cellEditor.isEditable())

      {

        value = cellEditor.getValue();

      }

      else if( cellEditor.getList().getSelectedItem() )

      {

 

        value = cellEditor.getList().getSelectedItem().getValue();

      }

                else

      {

        value = "";

      }

 

                ...

    }

 

The problem is, that "value" is "" if no entry will be selected when the 
combobox-list pops up.

 

To solve this problem you have to store the cellinfo-variable from the method 
"createCellEditor" in a member-variable like 

f.e. 

this.cellInfo = cellInfo;

 

than you can use this code inside your getCellEditorValue-method:

      var value = this.cellInfos.value;

      if (cellEditor.isEditable())

      {

        value = cellEditor.getValue();

      }

      else if( cellEditor.getList().getSelectedItem() )

      {

 

        value = cellEditor.getList().getSelectedItem().getValue();

      }

//      else

//      {

//        value = "";

//      }

 

 

 It's just an Idea. Maybe you can check this or any other solution for this 
problem ;)

 

Thanks 

Tobias

 

 

 

 

 

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to