You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Dustin Woods (JIRA)" <ji...@apache.org> on 2013/03/14 18:34:13 UTC

[jira] [Commented] (TAP5-902) GridDataSource does not allow performing less than 2 queries if returning results

    [ https://issues.apache.org/jira/browse/TAP5-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602469#comment-13602469 ] 

Dustin Woods commented on TAP5-902:
-----------------------------------

I have voted for this issue for the solution Howard suggested in the first comment of calling 'prepare' first.

I was starting to use the Spring Data APIs which can return a Page object with the content and the total count but Tapestry is requiring the total count before I know which page to load so I have to either call it twice or abandon the use of the Page object returned from the DAO/Repository.

Thanks,
Dustin

http://static.springsource.org/spring-data/commons/docs/current/api/org/springframework/data/domain/Page.html
                
> GridDataSource does not allow performing less than 2 queries if returning results
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-902
>                 URL: https://issues.apache.org/jira/browse/TAP5-902
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Dan Adams
>              Labels: bulk-close-candidate
>
> By having getAvailableRows() and prepare() separate, any implementation is forced to perform 2 queries. Many systems allow getting the results of a query and the total count in one query so that you don't have to perform 2 queries. Getting around this requires some pretty gross hacks (unless you just don't use grid at all which is unfortunate).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira