Nguyen Tran (4) [Avatar] Offline
Hi everyone,

I have just recently bought the book yesterday (as the time of writing). I haved finished chap 1 which is very good and now I'm heading to chap 2. However, I'm stucked with the code in thymeleaf template. Would someone explain to me:

1. The only way to get access to the private field of an object - as far as I know - is thru constructor, getter, or setter. But in the code it just simply point to the field of the object by using ${} or *{name} for the selected object w/o any getters. How can this be? Would so help me please?? :[

2. I'm still very confused about when to use th:value and when to use th:field. Anyone, please smilie(

Thank you very much for reading my post. Any help or explanation would be really appreciate. Thanks
Nguyen Tran (4) [Avatar] Offline
Hi everyone,

I find the answers by reading the documents from thymleaf ( You can find it by going to the docs section. Read the documents about Thymeleaf+Spring, it will definitely help.
Jocelyn Lecomte (9) [Avatar] Offline
About your first point, it is because the getters/setters are generated by the lombok library, no need to write them.