Announcement Announcement Module
Collapse
No announcement yet.
paged result with a number page. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • paged result with a number page.

    I have a problem with paged result and can not solve:
    for example: i Have 77 datas in LDAP
    I want to show this datas in a component with paging
    Each page can display 10 datas of the result.
    if I walk from page (next or proviews)I would like to display the currence datas;

    the problem is that I'm not getting the result paged.

    look at the code:
    Code:
    List people= new ArrayList<IPessoa>();
            PagedResultsRequestControl requestControl;        
            requestControl =  new PagedResultsRequestControl(NUMBER, null);
    
            do {
              List groupTemp = getLdapTemplate().search(BASE_USERS, filter, searchControls, new MapperPessoa(), requestControl);
              people.addAll(groupTemp);
              requestControl = new PagedResultsRequestControl(TOTAL_PAGING_COMBO, requestControl.getCookie());
              
            }while ((requestControl.getCookie() != null) && (requestControl.getCookie().getCookie()!= null) && (requestControl.getCookie().getCookie().length != 0));
            if (requestControl.getCookie().getCookie() != null){
                requestControl.createRequestControl();
            }

    I'm working with PagedResultsRequestControl
    This code return 77 datas from LDAP in the unique page.

    How i can to send a number page and the spring return the slice paged result ?

    since, thanks a lot

  • #2
    [Solved]

    I got using the PagedListHolder
    I created a class called MyPagedListHolder that extends PagedListHolder.

    In this class I add my pagedView that have a a page that I want to display.

    When I set the list (mypagedlistholder.setSource(list)) I challed a method ChangePage() in MyPagedListHolder.
    So, in this method, I get the pageView and set the new page to display. success!

    I hope you can understand
    best regards,


    Paulo Roberto de Camargo Mello Junior, Araraquara - SP (Brazil ).
    Last edited by paulocamargomello; Jul 1st, 2009, 10:28 AM.

    Comment

    Working...
    X