org.springframework.data.domain.Page has two methods which would be useful for creating a paginator component in a Web page: hasPreviousPage() and hasNextPage().
However, if I am using Thymeleaf, and I configure the template engine as follows:
I have so far failed to find a valid expression to access either method in a Web page. None of the following work:
What is the right way to do this in an expression, if any, using these two methods? (Yes, I know, I can write th:if="${not page.firstPage}" ... I'm doing that right now, while waiting for a reply.)
However, if I am using Thymeleaf, and I configure the template engine as follows:
Code:
@Bean
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver());
return engine;
}
${page.previousPage}
${page.hasPreviousPage}
${page.hasPreviousPage()}
${page.hasPreviousPage}
${page.hasPreviousPage()}
What is the right way to do this in an expression, if any, using these two methods? (Yes, I know, I can write th:if="${not page.firstPage}" ... I'm doing that right now, while waiting for a reply.)