The entity Operator doesn't have a field .openId... I don't understand.. – abc Mar 05 '18 at 14:02
  • 2
    If you're referring to [this question](https://stackoverflow.com/questions/37715276/how-do-i-populate-a-drop-down-with-a-list-using-thymeleaf-and-spring), indeed, the entity does not have `opeId`, it has `id` which is used as the value for the items in the dropdown. However, the user probably (they don't say explicitly) is binding the data to some other object. Perhaps it's a form where the user can input something related to an operator, for example scheduling shifts or making an inventory. You type your data, and then select the person to which the data belongs. Does it make sense? – Morfic Mar 05 '18 at 14:20
  • Yes, I understand now. Thank you! :) – abc Mar 06 '18 at 10:39
  • Cu placere! If this answers your question(or solves your problem) you can chose @LAT94 's answer below, which says basically the same but was posted before me. – Morfic Mar 06 '18 at 12:46
  • 1 Answers1

    0

    As mentioned in the Tutorial: Thymeleaf + Spring (go to 7.2 Inputs) it says that it is a model binding with your form and beans.

    lat94
    • 511
    • 1
    • 5
    • 18
    • In this example https://stackoverflow.com/questions/37715276/how-do-i-populate-a-drop-down-with-a-list-using-thymeleaf-and-spring th:filed seems to have other role from valide answer. – abc Mar 05 '18 at 13:28
    • How come? The th:field="${operator.opeId}" is how you can get the operatorName at option tag (th:text="${operator.operatorName}") – lat94 Mar 05 '18 at 13:42