Results 1 to 5 of 5

Thread: Generate Finders with MaxRows?

  1. #1
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default Generate Finders with MaxRows?

    Is it possible to generate finders that implement paging using the firstrow and maxrows methods on the query object in roo?

  2. #2
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Nevermind, I missed the find<type>Entries already generated by Roo.

  3. #3
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Actually, I still do need to create custom finders based on this format. What is the preferred method of creating custom finders?

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Paging is currently not supported for finders. However, it should be easy to retrofit by just taking a look at how this is done for the list method in the controller and the pagination.tagx. If you think it is a MUST then please log a Jira ticket on it and vote
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5
    Join Date
    Oct 2010
    Location
    Almere, The Netherlands
    Posts
    32

    Default

    Quote Originally Posted by Stefan Schmidt View Post
    and the pagination.tagx.
    I changed pagination.tagx like this:

    HTML Code:
    <spring:url value="" var="next">
      <spring:param name="page" value="${page + 1}" />
      <spring:param name="size" value="${size}" />
      <c:forEach var="requestParameter" items="${param}">
        <c:if test="${requestParameter.key != 'page' and requestParameter.key != 'size'}">
          <spring:param name="${requestParameter.key}" value="${requestParameter.value}" />
        </c:if>
      </c:forEach>
    </spring:url>
    This way any sort of finder list page or list page with additional parameters should work with pagination.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •