I am currently using these technologies
create a form where you sent a recipe-type object
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
private int id;
private String nombre;
@JsonIgnore
@ManyToOne
@JoinColumn(name = "receta_ingredientes", nullable = false)
private Receta receta_ingredientes;
and this class has 2 lists of classes (Ingredients and Steps) when generating the form because I do it this way
where I ask you to separate them by commas (to separate them in the controller and make a list of everything) unfortunately you can not
So I'm looking for a way for thymeleaf to automatically create a list of a class by seeing that the input has a comma
something like this are my inputs:
// Ingredients
<input class="form-control" th:field="*{ingredients}" type="text" placeholder="Ingredientes">
// Steps
<input class="form-control" th:field="*{pasos}" type="text" placeholder="Ingredientes">
some idea of how to connect this (that at the moment that thymeleaf sees a comma create another object to only generate a list of objects)