Can a key : value data format be used in tables, like it is in listviews?  It
seems like it should work, but it doesn't look like there any examples.

I'd like to create a table that does a text/url cell, comparable to the one
shown in the 'open 0...open 1...' column in this listview example:
http://demo.qooxdoo.org/html/test/ListView_2.html
http://demo.qooxdoo.org/html/test/ListView_2.html 

Seems like it should be simple, but when I try to format data in the
'key:value' format, I've not been successful.  My most recent attempt to use
key:value data format actually produced a table, but each cell contains
"[object Object]" instead of the desired values.  Here's the non-working
code from a modified table example I created:

 <html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>qooxdoo &raquo; Demo</title>
  <link type="text/css" rel="stylesheet"
href="../../resource/css/layout.css"/>
  <!--[if IE]>
  <link type="text/css" rel="stylesheet"
href="../../resource/css/layout_ie.css"/>
  <![endif]-->
  <script type="text/javascript" src="../../script/qx.js"></script>
</head>
<body>
  <script type="text/javascript" src="../../script/layout.js"></script>

  <div id="demoDescription">
    <p>trying to use key:value data format</p>
  </div>

  <script type="text/javascript">
  qx.core.Init.getInstance().defineMain(function()                              
  
  {
    var d = qx.ui.core.ClientDocument.getInstance();

    qx.ui.table.TablePane.USE_ARRAY_JOIN = true;

    // table model
    var tableModel = new qx.ui.table.SimpleTableModel();
    tableModel.setColumns([ "ID", "A number", "A date", "Boolean test" ]);
    var rowData = [];
    var now = new Date().getTime();
    var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days
    for (var row = 0; row < 100; row++) {
      var date = new Date(now + Math.random() * dateRange - dateRange / 2);

      rowData.push([ {text: row}, {text: Math.random() * 10000}, {text:
date}, {text: "123"}]);   
     
    }
    tableModel.setData(rowData);
    tableModel.setColumnEditable(1, true);
    tableModel.setColumnEditable(2, true);
    tableModel.setColumnEditable(3, true);
  
    // table
    var table = new qx.ui.table.Table(tableModel);
    with (table) {
      set({ left:10, top:30, right:300, bottom:30 });
      setMetaColumnCounts([1, -1]);
     
getSelectionModel().setSelectionMode(qx.ui.table.SelectionModel.MULTIPLE_INTERVAL_SELECTION);
        };

    d.add(table);
  });
  </script>
</body>
</html>
-- 
View this message in context: 
http://www.nabble.com/Can-%7Bkey-%3A-value%7D-format-be-used-in-tables--tf2537276.html#a7068829
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to