Holy fly paper, Batman!  It's a real bug!

I was under the impression that numerous people were actually using the
Remote Data Model, but it had a serious bug in it and just plain didn't
work.  I've fixed that bug and also provided a real live working example of
using the Remote Data Model.  The last tab of the qooxdoo-contrib project
RpcExample is a table that uses a remote table model.  It communicates via
JSON-RPC to the PHP (only, at the moment) backend which provides the data
for the table as it's requested.  I expect you'll have better luck now, but
if you still have problems, at least there's now an example you can refer
to.

Cheers,

Derrell

ps. The method you need to call you've retrieved the row count is
_onRowCountLoaded (note the leading underscore).  I expect that was just a
typo.



On Sun, Sep 21, 2008 at 12:53 AM, salman farci <[EMAIL PROTECTED]>wrote:

> Hi,
>
> Here is my code(very much incorrect) in that I have used Remote
> instead of Simple. Still doesn't seem to work.
>
> qx.Class.define("qx.ui.table.model.RemoteTable",
> {
>  extend : qx.ui.table.model.Remote,
>
>  members : {
>
>    _loadRowCount: function()
>   {
>   /* var tableModel = new qx.ui.table.model.Simple();
>    tableModel.setColumns(["User ID", "User Name", "Designation",
> "Residence Address", "Email ID", "Contact Number"]);
>    this.tableModel = tableModel;
>  */
>    var rpc = new
> qx.io.remote.Rpc("http://localhost/rpc/backend/index.php","user";);
>    var handler = function(result, exception)
>    {
>      if (exception==null) {
>                          alert(result); // tableModel.setData(result);
>                        }
>      else  { alert(exception); }          this.onRowCountLoaded(result);
>    };
>    rpc.callAsync(handler, "userList", "user");
>    //var table = new qx.ui.table.Table(tableModel);  table.set({
> width: 700, height: 400 }); return table;
>   },
>
>   _loadRowData : function()
>  {
>
>    var handler = function(result, exception) {
>       if (exception == null) {
>        alert(result);
>        var rowData = this.formulateRowData(result);
>    }
>     else
>     {
>        //alert(exception);
>     }
>   //  this._onRowDataLoaded (rowData);
>    };
>    rpc.callAsync(handler, "userList", firstRow, rowCount);
>    }
>  }
> });
>
> Regards
>
> Farci
>
> On Fri, Sep 19, 2008 at 6:48 AM, Derrell Lipman
> <[EMAIL PROTECTED]> wrote:
> > On Fri, Sep 19, 2008 at 2:35 AM, salman farci <[EMAIL PROTECTED]>
> wrote:
> >>
> >> Hi,
> >>
> >> Its been a hardtime for me to get done with atleast a simple "remote
> >> table model" working. After extending Remote class and implementing
> >> _loadRowCount() and _loadRowData(), it returns an error saying
> >> "_loadRowCount() is not a function", Thats one thing. And another
> >> thing is that once I get data from the backend server, how do i put on
> >> them on the remote table instead of Simple ?(May be I'm stupid at this
> >> point) Coz, I tried creating object for Remote() method &
> >> instantiating in order to put them on the table. But, it doesn't work.
> >> I'm using php for my server side scripting. Im eagerly looking forward
> >> & thankful for anyone who can provide me the code for remote model
> >> table.
> >
> > Why don't you post your class that extends Remote.  Maybe we can tell you
> > what the problem is.
> >
> > Derrell
> >
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > qooxdoo-devel mailing list
> > qooxdoo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



-- 
"There is nothing more difficult to plan, more doubtful of success, nor more
dangerous to manage than the creation of a new system. For the initiator has
the enmity of all who would profit by the preservation of the old system and
merely lukewarm defenders in those who would gain by the new one."
--Machiavelli, 1513
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to