Skip to content

Page links don't reflect changed Pageable #32

@fapdash

Description

@fapdash

First of all, thank you for this project. It's been of great help to me. :)

I'm currently trying to modify my Pageable in the controller.
What I'm basically doing:

	@RequestMapping(method = RequestMethod.GET)
	public String showCourses(Model model, Pageable pageable, HttpServletRequest request) {
                if (someCondition) {
                    pageable = savedPageable;
                }
                model.addAttribute(repository.findAll(pageable));
		return "admin/courses/index";
	}

I would like to have the page links in the rendered html to have the attributes of savedPageable.
So if savedPageable.getSize() == 10 the link to a page would also contain size=10.
What I already tried:

  • setting the attributes from savedPageable on the HttpServletRequest (in the controller or in a HandlerInterceptor#preHandler)
  • implementing and registering my own PageableHandlerMethodArgumentResolver

From where and when does the dialect get it's attributes for the url generation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions