Hi qooxdoo development community,

I am in the process of migrating my application from 0.8.2 to 0.8.3 so that
I can upgrade it to 1.x.

I have run into a problem I need help with, so I don't have to rewrite this
application. Many of our applications based on this data structure, so I'm
hoping there is a fairly easy fix...

I have a text value from a table cell, and I need to set the selected item
of a list to that text value. It used to be possible in previous versions by
setting the list value to some string value. Now I am trying to use
setSelection, but it takes a listItem and not a text value. I somehow need
to set this text value as the selected item in my list. My list contains a
list item with this value.

Here is some sample code:

var selector = this._selector = new qx.ui.form.List();

//some code here to populate the selector with data...

myTable.getSelectionModel().addListener("changeSelection", function(e) {
                        this._rowIndex =
e.getTarget().getLeadSelectionIndex();
                        if (this._rowIndex != -1)
                        {

                            var rowData =
myTableModel.getRowData(this._rowIndex);
                            this._cellData = rowData[lastColumn];

                            this._selector.setSelection([this._cellData]);
                        }

so this obviously doesn't work. " this._selector.setValue(this._cellData)"
works but I get a warning in firebug, and I assume it will not work in 1.x
i also tried in the above code:

     this._selector.setSelection([new
qx.ui.form.ListItem(this._cellData)]);

but that didn't wprk either, because my newly created listItem is not a
child element of my selector.

Please let me know how I can bridge this gap so that I can set a text value
somehow into a list, or convert the text value into a list item that would
work.  A sample code would be much appreciated!

Thank you in advance,
-Marta
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to