Hello,

firstly i want to thank you for such nice framework and great work!
I'm newbie in qooxdoo and just learning it. I have two questions:
1.  I'm trying to use remote table model and custom RowRenderer, which is
based on data from table. I wrote example with table, which model was
Simple and everything worked fine! However, when i changed table model from
Simple to Remote, Rowrenderer stopped to work normally. On table load it
returns error:
057196 qx.io.remote.RequestQueue[287-0]: Request
qx.io.remote.Request[831-0] handler _oncompleted threw an error: TypeError:
rowInfo.rowData is null
But in the same time it marks rows in needed color and returns error showed
above. As i understood the problem could be in fact, what getrowcount at
remote tablemodel don't get all rows, just cached ones or even 0 in new
releases... How to resolve this? My code is:
---> table model:
var tableModel = new app.RemoteDataModel(folder);
tableModel.setColumns([qx.locale.Manager.tr("Status"),
qx.locale.Manager.tr("Surname"),
qx.locale.Manager.tr("Name")], [ "status", "surname", "name"]);
var table = new qx.ui.table.Table(tableModel);
table.setShowCellFocusIndicator(false);
table.setHeight(300);
table.setDataRowRenderer(new app.InvoiceListRowRender(table));
--> app.InvoiceListRowRender(table) is taken from previous examples in this
mailing list
qx.Class.define("app.InvoiceListRowRender", {
  extend : qx.ui.table.rowrenderer.Default,
  members : {

    // overridden
    updateDataRowElement : function(rowInfo, rowElem)
    {
      this.base(arguments, rowInfo, rowElem);
      var style = rowElem.style;

      if (!(rowInfo.focusedRow && this.getHighlightFocusRow()) &&
!rowInfo.selected) {
        style.backgroundColor = (rowInfo.rowData.status > 0) ?
this._colors.bgcolEven : this._colors.bgcolOdd;
      }
    },

    // overridden
    createRowStyle : function(rowInfo)
    {
      var rowStyle = [];
      rowStyle.push(";");
      rowStyle.push(this.__fontStyleString);
      rowStyle.push("background-color:");

      if (rowInfo.focusedRow && this.getHighlightFocusRow())
      {
        rowStyle.push(rowInfo.selected ? this._colors.bgcolFocusedSelected
: this._colors.bgcolFocused);
      }
      else
      {
        if (rowInfo.selected)
        {
          rowStyle.push(this._colors.bgcolSelected);
        }
        else
        {
          rowStyle.push((rowInfo.rowData.status > 0) ?
this._colors.bgcolEven : this._colors.bgcolOdd);
        }
      }

      rowStyle.push(';color:');
      rowStyle.push(rowInfo.selected ? this._colors.colSelected :
this._colors.colNormal);

      rowStyle.push(';border-bottom: 1px solid ', this._colors.horLine);

      return rowStyle.join("");
    }
  }
});

How to avoid this error: rowInfo.rowData is null in remote table case?

2. question is related to virtual tree and click event
I have menu, which is based on virtual tree and when user clicks on folder
event returns value to function, which creates a widget and adds it to the
main Dock layout. However when user clicks on other folder in virtual tree
widget is not recreated in layout, but added. How to recreate widget? The
best example of this situation is qooxdoo demobrowser with tree on left
side and test on the right side. Could you please provide simple code
example to achieve this functionality?

Thanks!


Best Regards,
Victoria
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to