Thymeleaf deployable MVC

1

I'm with a basic project of a phone book with a series of data in which there are a series of requirements.

Spring boot

Thymeleaf

mySql

jpa

The project is advanced but I find the following problem, users must have a province from a table in the database different from the contact (to be able to change in the future). My solution has been to add a drop down with the provinces and add that "Data" to our bbdd by creating a provincecontact attribute.

I tried to do this:

<select >
<option th:each="provincia : ${provincias}" th:value="${provincia.idprovincia}" th:text="${provincia.provincia}"
th:selected="${provincia.provincia == contactos.provinciacontacto}"></option>
</select>        

With this, I intend to assign the name of the province that you have selected to the provincecontact field belonging to the contact table. But I can not make it work

Everything else works, I create a drop down with the provinces, list contacts edits erased etc but this brings me head.

    
asked by Joshb 11.12.2018 в 18:32
source

0 answers