title: EL1008E: Property or field 'content' cannot be found on object of type 'java.util.ArrayList' - maybe not public or not valid?
body: <p>I trying to make simple filter for my project(phonebook) to be able to find users contacts by their email instead of id. When I simply lauch the URL: <a href="http://localhost:8080/home/phonebook" rel="nofollow noreferrer">http://localhost:8080/home/phonebook</a>. I get the following error.</p>
  
  <p><strong>The error message</strong></p>
  
  <blockquote>
    <p>org.thymeleaf.exceptions.TemplateProcessingException: Exception
    evaluating SpringEL expression: "data.content" (template:
    "/home/phonebook" - line 29, col 13)</p>
    
    <p>Caused by:
    org.springframework.expression.spel.SpelEvaluationException: EL1008E:
    Property or field 'content' cannot be found on object of type
    'java.util.ArrayList' - maybe not public or not valid?</p>
  </blockquote>
  
  <p><strong>HomeController</strong></p>
  
  <pre><code>@RequestMapping(value = {"/home/phonebook"}, method = RequestMethod.GET)
      public String showPage(Model model, @RequestParam(defaultValue = "0") int page){
          Authentication auth = SecurityContextHolder.getContext().getAuthentication();
          User user = userService.findUserByEmail(auth.getName());
          model.addAttribute("data",phonebookRepository.findAllByUserEmail(user.getEmail(),PageRequest.of(page,10)));
          model.addAttribute("currentPage",page);
          return "/home/phonebook";
      }
  </code></pre>
  
  <p><strong>Phonebook.html</strong></p>
  
  <pre><code>&lt;tr th:each="phonebook :${data.content}"&gt;
          &lt;td th:text="${phonebook.id}"&gt;&lt;/td&gt;
          &lt;td th:text="${phonebook.surname}"&gt;&lt;/td&gt;
          &lt;td th:text="${phonebook.firstname}"&gt;&lt;/td&gt;
          &lt;td th:text="${phonebook.phoneNumber}"&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;a th:href="@{delete/(id=${phonebook.id})}" class="btn btn-danger delBtn"&gt;Delete&lt;/a&gt;
              &lt;a th:href="@{findOne/(id=${phonebook.id})}" class="btn btn-primary eBtn"&gt;Edit&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
          &lt;hr/&gt;
          &lt;ul class="nav nav-pills"&gt;
              &lt;li class="nav-item" th:each="i: ${#numbers.sequence(0,data.totalPages-1)}"&gt;
                  &lt;a th:href="@{/home/phonebook(page=${i})}" th:text="${i}" class="nav-link"
                     th:classappend="${currentPage}==${i}?'active':''"&gt;&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
  </code></pre>
  
  <p><strong>PhonebookRepository</strong></p>
  
  <pre><code>@Repository("phonebookRepository")
  public interface PhonebookRepository extends JpaRepository&lt;Phonebook,Integer&gt; {
      List&lt;Phonebook&gt; findAllByUserEmail(String email, Pageable pageable);
  }
  </code></pre>
  
  <p><strong>SecurityConfig</strong></p>
  
  <pre><code>@Override
      protected void configure(AuthenticationManagerBuilder auth) throws Exception {
          auth.jdbcAuthentication().dataSource(dataSource)
                  .usersByUsernameQuery("select email, password, active from users where email=?")
                  .authoritiesByUsernameQuery("select u.email, r.role from users u inner join user_role ur on(u.user_id=ur.user_id) inner join role r on(ur.role_id=r.role_id) where u.email=?")
                  .passwordEncoder(passwordEncoder());
  
      }
  </code></pre>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Made changes to <code>&lt;tr th:each="phonebook :${data}"&gt;</code> and i think it fixes it but i got a new error;</p>
  
  <blockquote>
    <p>org.thymeleaf.exceptions.TemplateProcessingException: Exception
    evaluating SpringEL expression:
    "#numbers.sequence(0,data.totalPages-1)" (template: "/home/phonebook"
    - line 42, col 38)</p>
    
    <p>Caused by:
    org.springframework.expression.spel.SpelEvaluationException: EL1008E:
    Property or field 'totalPages' cannot be found on object of type
    'java.util.ArrayList' - maybe not public or not valid?</p>
  </blockquote>