Well, I redesigned my paging logic bypassing lastRowKey. I used hibernate
query (any native sub query) with the firstRow and lastRow parameters.

List list = session.createQuery("from " + Table+ " order by MyDate asc")
        .setFirstResult(firstRow)
             .setMaxResults(rowCount)
             .list(); 

I hope it will help somebody. The firstRow and lastRow are more than enough.

Thanks guys. Qooxdoo is wonderful! I am going to spam you guys with lot of
questions as we are building a huge portal based on qooxdoo framework.

Thanks.
Kanugula.

kanugula wrote:
> 
> Hello,
> 
> Qooxdoo 0.7.3
> Windows XP,
> IE 6
> Tomcat 5.5.17
> 
> Finally, witht the help of Qooxdoo I made an application similar to Demo
> Browser.
> 
> My Remote Table works great, if the users scrolls down slowly.
> When you drag the vertical scroll bar too fast let's say to the middle of
> the scroll, the last row's getRowData() returns null. The firstRow and
> LastRow are correct.
> 
> I use that to pass the hidden unique row identifier to the backend, where
> an SQL query will be built as
> select * from Table where key > lastRowKey and rowCount =
> (lastRow-firstRow) + 1.
> 
> And also, I have seen _loadRowCount() gets called more than one time at
> the beginning. 
> 
> Can somebody help me please? Let me know if you need any more information.
> 
> Here is my code.
> 
>                 _loadRowCount: function ()
>                     {
>                       that = this;    
>                var rpc = new qx.io.remote.Rpc(); 
>                rpc.setTimeout(10000);                         
>                        rpc.setUrl("http://localhost:8080/myApp/.qxrpc";); 
>                        rpc.setServiceName("RpcService"); 
>                        rpc.setCrossDomain(true);  
>                               
>                        var handler = function(result, exc) {
>                       if (exc == null) {
>                           //alert("Server returned: "+result);
>                       
>                           that._onRowCountLoaded(result);
>                       }
>                       else 
>                       {
>                           alert("Exception from the server: "+exc);
>                       }
>               };    
>                       rpc.callAsync(handler, "getRowCount");                  
>         
>                     },
> 
>                 _loadRowData : function(firstRow, lastRow)
>                     {
>                       //alert("firstRow="+firstRow+";lastRow="+lastRow);
>                       //alert("Last seqNum="+this.getValue(0, firstRow-1));
>                       alert("Last RowData="+this.getRowData(firstRow-1));
> <---- Here is the Problem if the user scrolls too fast. It is fine if he
> scrolls slowly.
>                                                                          
>                       that = this;                               
>                       var rpc = new 
> qx.io.remote.Rpc("http://localhost:8080/myApp/.qxrpc";,
> "RpcService");
>                       rpc.setTimeout(30000);
>                       rpc.setCrossDomain(true);
>               
>                       var handler = function(result, exc) {
>                               if (exc == null) {                              
>             
>                                   var rowData = [];           
>                                   for (var i = firstRow; i <= lastRow; i++) {
>                                      rowData.push(....));                     
>                                                                            
> }
>                                   that.info ('Data retrieved');
>                                     that._onRowDataLoaded (rowData);
>                               }
>                               else 
>                               {
>                                   alert("Exception from the server: "+exc);
>                               }
>                       };
>                       var lastRowKey = this.getValue(0, firstRow-1); // My 
> last Row Key
>                       var rowCount = (lastRow - firstRow) + 1;
>                       rpc.callAsync(handler, "getData", lastRowKey , 
> firstRow, lastRow );                     
>                     }
> 
:jumping:
-- 
View this message in context: 
http://www.nabble.com/Remote-Table%27s-last-getRowData%28%29-becomes-null-if-scrolled-too-fast-tp15209447p15219832.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to