Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8340307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:08:44+00:00 2026-06-09T05:08:44+00:00

I am actually using Spring 3 MVC and listing data with pagination using PagedListHolder

  • 0

I am actually using Spring 3 MVC and listing data with pagination using PagedListHolder passing the method from my service layer to get all rows from a DB table like this:

PagedListHolder myList = new PagedListHolder(myService.getAll());

And this is my controller code:

public class MyListController implements Controller {

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {

        String page = request.getParameter("page");

        MyService myService = new MyService();
        PagedListHolder myList = new PagedListHolder(myService.getAll());
        myList.setPageSize(5); 

        if ("next".equals(page)) {
            myList.nextPage();
        }
        else if ("previous".equals(page)) {
            myList.previousPage();
        }

        ModelAndView modelAndView = new ModelAndView("myList");
        modelAndView.addObject("myList", myList.getPageList());
        return modelAndView;
    }
}

So, this is working perfect but I want to make now a search from myListby using a keyword and the normal way I think could be implementing a method in DAO and Service layers like for example:

...
String keyword = request.getParameter("keyword");
PagedListHolder myList = new PagedListHolder(myService.findByWord(keyword));
...

At this point myList will return all rows from DB that matches my keyword.

What I want to know is if there is a way to search from myList (using myService.getAll(); method and maybe some other method from PagedListHolder) and avoid modifying the DAO and Service layers for not creating extra methods like the one I used in the example above.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:08:46+00:00Added an answer on June 9, 2026 at 5:08 am

    There’s no search method in PagedListHolder. You can check the code here.

    In addition, if you are using Maven and STS(or maybe also Eclipse), you can check the code by Open Type command. Shortcut is CtrlShiftT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using spring mvc. I have 3 pages in my site (actually the
I am not actually using the Razor from ASP.NET MVC, I am using the
I have the following HQL in Hibernate using Spring MVC. List<Colour>list=session.createQuery(from Colour order by
I'm facing following problem actually: I'm using Spring with jQuery. I have Controller: @Controller
I am actually using h:selectOneRadio to display items, given to it from f:selectItems tag.
Using Spring 3 MVC and JSP, I simply want to test if a user
I'm using Spring MVC via a @Configuration class: @Configuration @EnableWebMvc public class WebConfiguration extends
i'm trying to make a log in. I'm using the Spring MVC framework. I
I am working in Spring MVC 2, Jsp, Dojo, Javascript . Actually I am
I have an issue using Ajax upload with Spring 3 MVC. I understand that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.