We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<td> <input class="form-control" th:field="${person.hm[__${rowStat.index}__].getKey}" th:errorclass="is-invalid"/> </td> <td> <input class="form-control" th:field="${person.hm[__${rowStat.index}__]}" th:errorclass="is-invalid"/> </td> <!-- <td> <div class="btn-group"> <button type="button" name="removeTest" th:value="${rowStat.index}" class="btn btn-outline-danger" data-update-test-url="/removeTest"> <i class="fas fa-trash"></i> </button> </div> </td> --> </tr> </tbody>
package com.example.demo.model;
import javax.persistence.*; import javax.validation.Valid; import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.HashMap; import java.util.List;
/**
Created by jjmendoza on 31/8/2018. */ //@entity public class Person {
// @id // @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;
// @notblank private String name;
// @notblank private String lastName;
// @Valid // @onetomany(cascade = CascadeType.ALL) // @joincolumn(name = "person_id") private List contactList = new ArrayList<>();
public List<String> testList = new ArrayList<>(); public HashMap<String,String> hm=new HashMap<String, String>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public List<Contact> getContactList() { return contactList; } public void setContactList(List<Contact> contactList) { this.contactList = contactList; } public List<String> getTestList() { return testList; } public void setTestList(List<String> testList) { this.testList = testList; } public HashMap<String, String> getHm() { return hm; } public void setHm(HashMap<String, String> hm) { this.hm = hm; } @Override public String toString() { for(Contact s:contactList) System.out.println(s.toString()); for(String s:testList) System.out .println(s+"1212121212 \n\n"); return "Person [id=" + id + ", name=" + name + ", lastName=" + lastName + ", contactList=" + contactList + ", testList=" + testList + ", hm=" + hm + "]"; }
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
1package com.example.demo.model;
import javax.persistence.*;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
Created by jjmendoza on 31/8/2018.
*/
//@entity
public class Person {
// @id
// @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
// @notblank
private String name;
// @notblank
private String lastName;
// @Valid
// @onetomany(cascade = CascadeType.ALL)
// @joincolumn(name = "person_id")
private List contactList = new ArrayList<>();
}
The text was updated successfully, but these errors were encountered: