title: Empty data table thymeleaf and spring-boot after filling form
body: <p>I'm having troubles with thymeleaf and spring boot to display data in table after a form filled succesfuly. Here is what i done:</p>
  <p>Form:</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;div class=&quot;col-md-12&quot;&gt;
                  &lt;div class=&quot;panel panel-default&quot;&gt;
                      &lt;div class=&quot;panel-heading&quot;&gt;
                          &lt;h3 class=&quot;panel-title&quot;&gt;Cargar Agenda&lt;/h3&gt;
                      &lt;/div&gt;
                      &lt;div th:if=&quot;${error != null}&quot; th:text=&quot;${error}&quot; class=&quot;alert alert-danger&quot; role=&quot;alert&quot;&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;panel-body&quot;&gt;
                          &lt;form th:action=&quot;@{/guardar}&quot; method=&quot;POST&quot;&gt;
                              &lt;div class=&quot;form-group&quot;&gt;
                                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;nombre&quot; id=&quot;nombre&quot; th:value=&quot;${nombre}&quot; placeholder=&quot;Nombre&quot;&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;form-group&quot;&gt;
                                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;apellido&quot; id=&quot;apellido&quot; th:value=&quot;${apellido}&quot; placeholder=&quot;Apellido&quot;&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;form-group&quot;&gt;
                                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;telefono&quot; id=&quot;telefono&quot; th:value=&quot;${telefono}&quot; placeholder=&quot;Teléfono&quot;&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;form-group&quot;&gt;
                                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;email&quot; id=&quot;email&quot; th:value=&quot;${email}&quot; placeholder=&quot;E-mail&quot;&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;form-group&quot;&gt;
                                  &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;domicilio&quot; id=&quot;domicilio&quot; th:value=&quot;${domicilio}&quot; placeholder=&quot;Domicilio&quot;&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;d-grid gap-2&quot;&gt;
                                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Guardar&lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/form&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p>Table:</p>
  <pre><code>&lt;div class=&quot;table-responsive&quot;&gt;
      &lt;table class=&quot;table table-striped table-bordered table-hover table-sm&quot;&gt;
          &lt;thead class=&quot;thead-dark&quot;&gt;
              &lt;tr class=&quot;bg-primary&quot; scope=&quot;row&quot;&gt;
                  &lt;th scope=&quot;col&quot;&gt;Nombre&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Apellido&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Teléfono&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;E-mail&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Domicilio&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr scope=&quot;row&quot; th:each=&quot;agenda : ${listaAgendas}&quot;&gt;
                  &lt;td scope=&quot;col&quot; th:text=&quot;${agenda.nombre}&quot;&gt;&lt;/td&gt;
                  &lt;td scope=&quot;col&quot; th:text=&quot;${agenda.apellido}&quot;&gt;&lt;/td&gt;
                  &lt;td scope=&quot;col&quot; th:text=&quot;${agenda.telefono}&quot;&gt;&lt;/td&gt;
                  &lt;td scope=&quot;col&quot; th:text=&quot;${agenda.email}&quot;&gt;&lt;/td&gt;
                  &lt;td scope=&quot;col&quot; th:text=&quot;${agenda.domicilio}&quot;&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Controller PostMapping:</p>
  <pre><code>    @PostMapping(&quot;/guardar&quot;)
      public String guardar(ModelMap map, @RequestParam String nombre, @RequestParam String apellido,
                           @RequestParam Long telefono, @RequestParam String email,
                           @RequestParam String domicilio) {
          try {
              agendaService.crear(nombre, apellido, telefono, email, domicilio);
          } catch (AgendaException ex) {
              map.put(&quot;error&quot;, ex.getMessage());
              map.put(&quot;nombre&quot;, nombre);
              map.put(&quot;apellido&quot;, apellido);
              map.put(&quot;telefono&quot;, telefono);
              map.put(&quot;email&quot;, email);
              map.put(&quot;domicilio&quot;, domicilio);
              return &quot;carga&quot;;
          }
          return &quot;lista-agendas&quot;;
      }
  </code></pre>
  <p>Controller GetMapping:</p>
  <pre><code>    @GetMapping(&quot;/lista-agendas&quot;)
      public String listaAgendas(ModelMap map) {
          List&lt;Agenda&gt; listaAgendas = agendaService.listaAgendas();
          map.put(&quot;listaAgendas&quot;, listaAgendas);
          return &quot;lista-agendas&quot;;
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/x4Ndi.png" rel="nofollow noreferrer">lista-agendas-html render this by his self</a></p>
  <p><a href="https://i.stack.imgur.com/qetZ6.png" rel="nofollow noreferrer">Filled form</a></p>
  <p>but lista-agendas.html after clicking the form button, display table without data:</p>
  <p><a href="https://i.stack.imgur.com/lgEMB.png" rel="nofollow noreferrer">no data in the table after clicking form button to submit</a></p>