hi,

we saw that communicating complex (nested) objects makes our life easier in some respects. however qooxdoo's remote table implementation lacks support for nested objects. a small patch that remedies this problem is attached. it applies to the latest trunk.

thanks to this patch, i'm able to write:

table_model.setColumns( ["ID", "Name", "Complex Code"],
                       ["id", "name", ["complex_object","code"]]);

where the last column is extracted from rowData["complex_object"]["code"]

awaiting your feedback.

best regards
burak



Index: framework/source/class/qx/ui/table/model/Remote.js
===================================================================
--- framework/source/class/qx/ui/table/model/Remote.js  (revision 20293)
+++ framework/source/class/qx/ui/table/model/Remote.js  (working copy)
@@ -746,7 +746,17 @@
       else
       {
         var columnId = this.getColumnId(columnIndex);
-        return rowData[columnId];
+        var retval=null;
+        if (columnId.constructor == Array) {
+            retval = rowData[columnId[0]];
+            for (var i=1; i< columnId.length; ++i) {
+                retval = retval[columnId[i]];
+            }
+        }
+        else {
+            retval = rowData[columnId];
+        }
+        return retval;
       }
     },
 
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to