|
#1
|
|||
|
|||
|
Hi there,
I'm creating this thread hoping to aggregate info on this in one place. Information regarding this issue is scattered all over the forum but there is no single thread which says how to do it while retaining functionality available in SqlDataSource (sorting, filtering etc) Client side documentation regarding ResultSet states that there is nothing to be done clientside to implement this. You just have to return totalRows > endRow on the server. What if I want to use SQLDataSource and all its built in functionality (no custom queries etc.) but skip the phase where SQLDataSource sets totalRows on response. I know SQLDataSource may compute this value in many ways (resultSet scroll, LIMIT statement etc.) depending on database, driver etc. Is there any way I can disable built in counting and provide totalRows computed manually? lkc |
|
#2
|
|||
|
|||
|
Use the attribute "skipRowCount" on the operationBinding like here:
Code:
<operationBinding operationType="fetch" serverMethod="fetch" skipRowCount="true" > Code:
// in case the total rows was not calculated because a count sql was not performed
// we use the "progressive" loading approach
dsResponse.setTotalRows(
dsResponse.getEndRow() < dsRequest.getEndRow() ? // actual response contains more or less rows then requested ?
dsResponse.getEndRow() // less rows
: dsRequest.getEndRow() + 2*(dsRequest.getEndRow() - dsRequest.getStartRow()) // more or equal number of rows - then return the actual number of rows plus 2 size of the page
);
|
|
#3
|
|||
|
|||
|
SC_SNAPSHOT-2012-03-20_v8.2p/PowerEdition
I'm trying this exact approach, but in the server logs there's this INFO: Code:
=== 2012-04-04 17:22:46,922 [c-64] INFO SQLDataSource - [builtinApplication.SERVIZI_fetch] Skipping row count query - Row count will be obtained by traversing the entire dataset |
|
#4
|
|||
|
|||
|
progressiveLoading is now built in - see operationBinding.progessiveLoading.
|
|
#5
|
|||
|
|||
|
I see it's a 8.3d feature...I'll try it.
I want to use it as a workaround for this problem I have with distinct http://forums.smartclient.com/showthread.php?t=17947 where the select count(*) returns a number of rows which is different from the actual select distinct |
|
#6
|
|||
|
|||
|
found a bug which blocks me migrating to 8.3:
http://forums.smartclient.com/showpost.php?p=84237&postcount=1 |
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Loading prompt of grid: modalmask on loading grid, center of prompt | martintaal | Technical Q&A | 9 | 20th May 2011 05:58 |
| Grouping with Progressive loading | satyag | Smart GWT Technical Q&A | 0 | 1st Oct 2009 22:56 |
| loading indicator at the startup of ShowCase | jasonzhang2002 | Smart GWT Technical Q&A | 5 | 29th May 2009 21:03 |
| Lazy Rendering vs Lazy Loading | hgaglani | Smart GWT Technical Q&A | 5 | 7th Apr 2009 08:10 |
| Loading data.. message does not dissappear during ListGrid fetchData | mahen | Technical Q&A | 4 | 13th Nov 2007 10:00 |