Thymeleaf checkbox bind list of object The Next CEO of Stack OverflowHow to send the value of multiple checkbox in Thymeleaf and Spring Boot MVC?How to check if checkbox is checked when submiting a form in Thymeleaf and Spring boot?Json parsing in android using restTemplate (BEGIN_ARRAY but was BEGIN_OBJECT)Hibernate: ManyToMany inverse DeleteHow to render partial view in Spring MVCThymeleaf Binding list of objectsHow to bind an object list with thymeleaf?Using RowMapper and JdbcTemplate got NullPointerExceptionHow to bind an object list to checkbox in thymeleaf?(Spring, Thymeleaf) How to request to controller 'POST' with list of model inside a model?Bind attribute to checkbox value Thymeleafshow details of all orders placed by customer

Direct Implications Between USA and UK in Event of No-Deal Brexit

Is this a new Fibonacci Identity?

How can I prove that a state of equilibrium is unstable?

Could you use a laser beam as a modulated carrier wave for radio signal?

That's an odd coin - I wonder why

What does this strange code stamp on my passport mean?

How seriously should I take size and weight limits of hand luggage?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Calculating discount not working

How to unfasten electrical subpanel attached with ramset

Creating a script with console commands

"Eavesdropping" vs "Listen in on"

How to implement Comparable so it is consistent with identity-equality

Upgrading From a 9 Speed Sora Derailleur?

Why can't we say "I have been having a dog"?

What steps are necessary to read a Modern SSD in Medieval Europe?

Is it possible to create a QR code using text?

Is a linearly independent set whose span is dense a Schauder basis?

Can this transistor (2n2222) take 6V on emitter-base? Am I reading datasheet incorrectly?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Does int main() need a declaration on C++?

How to pronounce fünf in 45

Prodigo = pro + ago?

How badly should I try to prevent a user from XSSing themselves?



Thymeleaf checkbox bind list of object



The Next CEO of Stack OverflowHow to send the value of multiple checkbox in Thymeleaf and Spring Boot MVC?How to check if checkbox is checked when submiting a form in Thymeleaf and Spring boot?Json parsing in android using restTemplate (BEGIN_ARRAY but was BEGIN_OBJECT)Hibernate: ManyToMany inverse DeleteHow to render partial view in Spring MVCThymeleaf Binding list of objectsHow to bind an object list with thymeleaf?Using RowMapper and JdbcTemplate got NullPointerExceptionHow to bind an object list to checkbox in thymeleaf?(Spring, Thymeleaf) How to request to controller 'POST' with list of model inside a model?Bind attribute to checkbox value Thymeleafshow details of all orders placed by customer










2















I'm new in Thymeleaf with Spring, I want to add new Employee which content list of Certificate. I used th:checkbox to bind the list of Certificate passed from controller. My Codes:



Controller



@RequestMapping(value = "/add" , method = RequestMethod.GET)
public String add(Model model)
model.addAttribute("employee",new Employee());
model.addAttribute("certificates",certificateService.getList());
return "add";


@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(@ModelAttribute("employee")Employee employee)
System.out.println(employee);
return "list";



Beans



Employee



@Entity
@Table(name = "employee")
public class Employee

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private int id;

@Column(name = "Name")
private String name;

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "emp_cert",
joinColumns = @JoinColumn(name = "employee_id"),
inverseJoinColumns = @JoinColumn(name = "certificate_id"))
private List<Certificate> certificates;

public Employee()
if (certificates == null)
certificates = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Certificate> getCertificates()
return certificates;


public void setCertificates(List<Certificate> certificates)
this.certificates = certificates;


@Override
public String toString()
return "Employee [id=" + id + ", name=" + name + "certificates size = " + certificates.size() + " ]";




Certificate



@Entity
@Table(name = "certificate")
public class Certificate

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
private int id;

@Column(name = "name")
private String name;

@ManyToMany(mappedBy = "certificates")
private List<Employee> employees;

public Certificate()
if (employees == null)
employees = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Employee> getEmployees()
return employees;


public void setEmployees(List<Employee> employees)
this.employees = employees;


@Override
public int hashCode()
final int prime = 31;
int result = 1;
result = prime * result + id;
return result;


@Override
public boolean equals(Object obj)
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Certificate other = (Certificate) obj;
if (id != other.id)
return false;
return true;




HTML Form



<form action="#" th:action="@/employee/add" th:object="$employee" method="post">
<table>
<tr>
<td>Name</td>
<td><input type="text" th:field="*name"></td>
</tr>
<tr>
<td>Certificate</td>
<td>
<th:block th:each="certificate , stat : $certificates">
<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>
<label th:text="$certificate.name" ></label>
</th:block>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Add"/></td>
</tr>
</table>
</form>


The problem is, When I'm trying to submit the form I got



400 - The request sent by the client was syntactically incorrect.


Hopefully someone has a suggestion how to solve this.










share|improve this question
























  • Hi, did you manage to solve it? I'm stuck with similar problem.

    – agilob
    Nov 2 '16 at 8:57











  • Hi , i will add it in solution below

    – Al-Mustafa Azhari
    Nov 2 '16 at 9:48















2















I'm new in Thymeleaf with Spring, I want to add new Employee which content list of Certificate. I used th:checkbox to bind the list of Certificate passed from controller. My Codes:



Controller



@RequestMapping(value = "/add" , method = RequestMethod.GET)
public String add(Model model)
model.addAttribute("employee",new Employee());
model.addAttribute("certificates",certificateService.getList());
return "add";


@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(@ModelAttribute("employee")Employee employee)
System.out.println(employee);
return "list";



Beans



Employee



@Entity
@Table(name = "employee")
public class Employee

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private int id;

@Column(name = "Name")
private String name;

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "emp_cert",
joinColumns = @JoinColumn(name = "employee_id"),
inverseJoinColumns = @JoinColumn(name = "certificate_id"))
private List<Certificate> certificates;

public Employee()
if (certificates == null)
certificates = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Certificate> getCertificates()
return certificates;


public void setCertificates(List<Certificate> certificates)
this.certificates = certificates;


@Override
public String toString()
return "Employee [id=" + id + ", name=" + name + "certificates size = " + certificates.size() + " ]";




Certificate



@Entity
@Table(name = "certificate")
public class Certificate

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
private int id;

@Column(name = "name")
private String name;

@ManyToMany(mappedBy = "certificates")
private List<Employee> employees;

public Certificate()
if (employees == null)
employees = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Employee> getEmployees()
return employees;


public void setEmployees(List<Employee> employees)
this.employees = employees;


@Override
public int hashCode()
final int prime = 31;
int result = 1;
result = prime * result + id;
return result;


@Override
public boolean equals(Object obj)
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Certificate other = (Certificate) obj;
if (id != other.id)
return false;
return true;




HTML Form



<form action="#" th:action="@/employee/add" th:object="$employee" method="post">
<table>
<tr>
<td>Name</td>
<td><input type="text" th:field="*name"></td>
</tr>
<tr>
<td>Certificate</td>
<td>
<th:block th:each="certificate , stat : $certificates">
<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>
<label th:text="$certificate.name" ></label>
</th:block>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Add"/></td>
</tr>
</table>
</form>


The problem is, When I'm trying to submit the form I got



400 - The request sent by the client was syntactically incorrect.


Hopefully someone has a suggestion how to solve this.










share|improve this question
























  • Hi, did you manage to solve it? I'm stuck with similar problem.

    – agilob
    Nov 2 '16 at 8:57











  • Hi , i will add it in solution below

    – Al-Mustafa Azhari
    Nov 2 '16 at 9:48













2












2








2


2






I'm new in Thymeleaf with Spring, I want to add new Employee which content list of Certificate. I used th:checkbox to bind the list of Certificate passed from controller. My Codes:



Controller



@RequestMapping(value = "/add" , method = RequestMethod.GET)
public String add(Model model)
model.addAttribute("employee",new Employee());
model.addAttribute("certificates",certificateService.getList());
return "add";


@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(@ModelAttribute("employee")Employee employee)
System.out.println(employee);
return "list";



Beans



Employee



@Entity
@Table(name = "employee")
public class Employee

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private int id;

@Column(name = "Name")
private String name;

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "emp_cert",
joinColumns = @JoinColumn(name = "employee_id"),
inverseJoinColumns = @JoinColumn(name = "certificate_id"))
private List<Certificate> certificates;

public Employee()
if (certificates == null)
certificates = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Certificate> getCertificates()
return certificates;


public void setCertificates(List<Certificate> certificates)
this.certificates = certificates;


@Override
public String toString()
return "Employee [id=" + id + ", name=" + name + "certificates size = " + certificates.size() + " ]";




Certificate



@Entity
@Table(name = "certificate")
public class Certificate

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
private int id;

@Column(name = "name")
private String name;

@ManyToMany(mappedBy = "certificates")
private List<Employee> employees;

public Certificate()
if (employees == null)
employees = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Employee> getEmployees()
return employees;


public void setEmployees(List<Employee> employees)
this.employees = employees;


@Override
public int hashCode()
final int prime = 31;
int result = 1;
result = prime * result + id;
return result;


@Override
public boolean equals(Object obj)
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Certificate other = (Certificate) obj;
if (id != other.id)
return false;
return true;




HTML Form



<form action="#" th:action="@/employee/add" th:object="$employee" method="post">
<table>
<tr>
<td>Name</td>
<td><input type="text" th:field="*name"></td>
</tr>
<tr>
<td>Certificate</td>
<td>
<th:block th:each="certificate , stat : $certificates">
<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>
<label th:text="$certificate.name" ></label>
</th:block>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Add"/></td>
</tr>
</table>
</form>


The problem is, When I'm trying to submit the form I got



400 - The request sent by the client was syntactically incorrect.


Hopefully someone has a suggestion how to solve this.










share|improve this question
















I'm new in Thymeleaf with Spring, I want to add new Employee which content list of Certificate. I used th:checkbox to bind the list of Certificate passed from controller. My Codes:



Controller



@RequestMapping(value = "/add" , method = RequestMethod.GET)
public String add(Model model)
model.addAttribute("employee",new Employee());
model.addAttribute("certificates",certificateService.getList());
return "add";


@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(@ModelAttribute("employee")Employee employee)
System.out.println(employee);
return "list";



Beans



Employee



@Entity
@Table(name = "employee")
public class Employee

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private int id;

@Column(name = "Name")
private String name;

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "emp_cert",
joinColumns = @JoinColumn(name = "employee_id"),
inverseJoinColumns = @JoinColumn(name = "certificate_id"))
private List<Certificate> certificates;

public Employee()
if (certificates == null)
certificates = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Certificate> getCertificates()
return certificates;


public void setCertificates(List<Certificate> certificates)
this.certificates = certificates;


@Override
public String toString()
return "Employee [id=" + id + ", name=" + name + "certificates size = " + certificates.size() + " ]";




Certificate



@Entity
@Table(name = "certificate")
public class Certificate

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
private int id;

@Column(name = "name")
private String name;

@ManyToMany(mappedBy = "certificates")
private List<Employee> employees;

public Certificate()
if (employees == null)
employees = new ArrayList<>();


public int getId()
return id;


public void setId(int id)
this.id = id;


public String getName()
return name;


public void setName(String name)
this.name = name;


public List<Employee> getEmployees()
return employees;


public void setEmployees(List<Employee> employees)
this.employees = employees;


@Override
public int hashCode()
final int prime = 31;
int result = 1;
result = prime * result + id;
return result;


@Override
public boolean equals(Object obj)
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Certificate other = (Certificate) obj;
if (id != other.id)
return false;
return true;




HTML Form



<form action="#" th:action="@/employee/add" th:object="$employee" method="post">
<table>
<tr>
<td>Name</td>
<td><input type="text" th:field="*name"></td>
</tr>
<tr>
<td>Certificate</td>
<td>
<th:block th:each="certificate , stat : $certificates">
<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>
<label th:text="$certificate.name" ></label>
</th:block>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Add"/></td>
</tr>
</table>
</form>


The problem is, When I'm trying to submit the form I got



400 - The request sent by the client was syntactically incorrect.


Hopefully someone has a suggestion how to solve this.







spring spring-mvc thymeleaf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 26 '18 at 8:19









Mahozad

1,78751335




1,78751335










asked Sep 10 '16 at 9:36









Al-Mustafa AzhariAl-Mustafa Azhari

466620




466620












  • Hi, did you manage to solve it? I'm stuck with similar problem.

    – agilob
    Nov 2 '16 at 8:57











  • Hi , i will add it in solution below

    – Al-Mustafa Azhari
    Nov 2 '16 at 9:48

















  • Hi, did you manage to solve it? I'm stuck with similar problem.

    – agilob
    Nov 2 '16 at 8:57











  • Hi , i will add it in solution below

    – Al-Mustafa Azhari
    Nov 2 '16 at 9:48
















Hi, did you manage to solve it? I'm stuck with similar problem.

– agilob
Nov 2 '16 at 8:57





Hi, did you manage to solve it? I'm stuck with similar problem.

– agilob
Nov 2 '16 at 8:57













Hi , i will add it in solution below

– Al-Mustafa Azhari
Nov 2 '16 at 9:48





Hi , i will add it in solution below

– Al-Mustafa Azhari
Nov 2 '16 at 9:48












2 Answers
2






active

oldest

votes


















10














I used custom solution to solve it , by send Certificates id to controller in array and received it as RequestParam . The require changes are define below .



View



 <tr>
<td>Certificate</td>
<td>
<th:block th:each="certificate : $certificates">
<input type="checkbox" name="cers" th:value="$certificate.id"/>
<label th:text="$certificate.name"></label>
</th:block>
</td>
</tr>


Controller



@RequestMapping(value = "/add" , method = RequestMethod.POST)
public String addSave(
@ModelAttribute("employee")Employee employee ,
@RequestParam(value = "cers" , required = false) int[] cers ,
BindingResult bindingResult , Model model) {

if(cers != null)
Certificate certificate = null ;
for (int i = 0; i < cers.length; i++)

if(certificateService.isFound(cers[i]))
certificate = new Certificate();
certificate.setId(cers[i]);
employee.getCertificates().add(certificate);


for (int i = 0; i < employee.getCertificates().size(); i++)
System.out.println(employee.getCertificates().get(i));







share|improve this answer























  • Oh, thanks, I was over complicating it all

    – agilob
    Nov 2 '16 at 10:42


















0














Can you check you Html Template syntax and change below line:



<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>


to:



<input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id"/>





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39424715%2fthymeleaf-checkbox-bind-list-of-object%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    10














    I used custom solution to solve it , by send Certificates id to controller in array and received it as RequestParam . The require changes are define below .



    View



     <tr>
    <td>Certificate</td>
    <td>
    <th:block th:each="certificate : $certificates">
    <input type="checkbox" name="cers" th:value="$certificate.id"/>
    <label th:text="$certificate.name"></label>
    </th:block>
    </td>
    </tr>


    Controller



    @RequestMapping(value = "/add" , method = RequestMethod.POST)
    public String addSave(
    @ModelAttribute("employee")Employee employee ,
    @RequestParam(value = "cers" , required = false) int[] cers ,
    BindingResult bindingResult , Model model) {

    if(cers != null)
    Certificate certificate = null ;
    for (int i = 0; i < cers.length; i++)

    if(certificateService.isFound(cers[i]))
    certificate = new Certificate();
    certificate.setId(cers[i]);
    employee.getCertificates().add(certificate);


    for (int i = 0; i < employee.getCertificates().size(); i++)
    System.out.println(employee.getCertificates().get(i));







    share|improve this answer























    • Oh, thanks, I was over complicating it all

      – agilob
      Nov 2 '16 at 10:42















    10














    I used custom solution to solve it , by send Certificates id to controller in array and received it as RequestParam . The require changes are define below .



    View



     <tr>
    <td>Certificate</td>
    <td>
    <th:block th:each="certificate : $certificates">
    <input type="checkbox" name="cers" th:value="$certificate.id"/>
    <label th:text="$certificate.name"></label>
    </th:block>
    </td>
    </tr>


    Controller



    @RequestMapping(value = "/add" , method = RequestMethod.POST)
    public String addSave(
    @ModelAttribute("employee")Employee employee ,
    @RequestParam(value = "cers" , required = false) int[] cers ,
    BindingResult bindingResult , Model model) {

    if(cers != null)
    Certificate certificate = null ;
    for (int i = 0; i < cers.length; i++)

    if(certificateService.isFound(cers[i]))
    certificate = new Certificate();
    certificate.setId(cers[i]);
    employee.getCertificates().add(certificate);


    for (int i = 0; i < employee.getCertificates().size(); i++)
    System.out.println(employee.getCertificates().get(i));







    share|improve this answer























    • Oh, thanks, I was over complicating it all

      – agilob
      Nov 2 '16 at 10:42













    10












    10








    10







    I used custom solution to solve it , by send Certificates id to controller in array and received it as RequestParam . The require changes are define below .



    View



     <tr>
    <td>Certificate</td>
    <td>
    <th:block th:each="certificate : $certificates">
    <input type="checkbox" name="cers" th:value="$certificate.id"/>
    <label th:text="$certificate.name"></label>
    </th:block>
    </td>
    </tr>


    Controller



    @RequestMapping(value = "/add" , method = RequestMethod.POST)
    public String addSave(
    @ModelAttribute("employee")Employee employee ,
    @RequestParam(value = "cers" , required = false) int[] cers ,
    BindingResult bindingResult , Model model) {

    if(cers != null)
    Certificate certificate = null ;
    for (int i = 0; i < cers.length; i++)

    if(certificateService.isFound(cers[i]))
    certificate = new Certificate();
    certificate.setId(cers[i]);
    employee.getCertificates().add(certificate);


    for (int i = 0; i < employee.getCertificates().size(); i++)
    System.out.println(employee.getCertificates().get(i));







    share|improve this answer













    I used custom solution to solve it , by send Certificates id to controller in array and received it as RequestParam . The require changes are define below .



    View



     <tr>
    <td>Certificate</td>
    <td>
    <th:block th:each="certificate : $certificates">
    <input type="checkbox" name="cers" th:value="$certificate.id"/>
    <label th:text="$certificate.name"></label>
    </th:block>
    </td>
    </tr>


    Controller



    @RequestMapping(value = "/add" , method = RequestMethod.POST)
    public String addSave(
    @ModelAttribute("employee")Employee employee ,
    @RequestParam(value = "cers" , required = false) int[] cers ,
    BindingResult bindingResult , Model model) {

    if(cers != null)
    Certificate certificate = null ;
    for (int i = 0; i < cers.length; i++)

    if(certificateService.isFound(cers[i]))
    certificate = new Certificate();
    certificate.setId(cers[i]);
    employee.getCertificates().add(certificate);


    for (int i = 0; i < employee.getCertificates().size(); i++)
    System.out.println(employee.getCertificates().get(i));








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 2 '16 at 9:45









    Al-Mustafa AzhariAl-Mustafa Azhari

    466620




    466620












    • Oh, thanks, I was over complicating it all

      – agilob
      Nov 2 '16 at 10:42

















    • Oh, thanks, I was over complicating it all

      – agilob
      Nov 2 '16 at 10:42
















    Oh, thanks, I was over complicating it all

    – agilob
    Nov 2 '16 at 10:42





    Oh, thanks, I was over complicating it all

    – agilob
    Nov 2 '16 at 10:42













    0














    Can you check you Html Template syntax and change below line:



    <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>


    to:



    <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id"/>





    share|improve this answer



























      0














      Can you check you Html Template syntax and change below line:



      <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>


      to:



      <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id"/>





      share|improve this answer

























        0












        0








        0







        Can you check you Html Template syntax and change below line:



        <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>


        to:



        <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id"/>





        share|improve this answer













        Can you check you Html Template syntax and change below line:



        <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id]"/>


        to:



        <input type="checkbox" th:field="*certificates" name="certificates" th:value="$certificate.id"/>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 '18 at 12:10









        johnnycashjohnnycash

        11




        11



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39424715%2fthymeleaf-checkbox-bind-list-of-object%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            1928 у кіно

            Захаров Федір Захарович

            Ель Греко