Skip to content
New issue

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

Chapter 2 design.html causes parse Error. #116

Open
ChristophKronberger opened this issue May 16, 2022 · 3 comments
Open

Chapter 2 design.html causes parse Error. #116

ChristophKronberger opened this issue May 16, 2022 · 3 comments

Comments

@ChristophKronberger
Copy link

The design.html works not out of the Box.

After removeing <input type="text" th:field="*{name}"/> <!-- end::all[] --> <span th:text="${#fields.hasErrors('name')}">XXX</span> <span class="validationError" th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name Error</span>

The file is correct parsed.

Before i got a "Bean property 'name' is not readable or has an invalid getter" Exception

@10kshuaizhang
Copy link

10kshuaizhang commented Jun 22, 2022

This problem is caused by the code error. You can change the code to

    public String showDesignForm(Model model) {
        model.addAttribute("design", new Taco());

        return "design";
    }

you can see the code in book was model.addAttribute("taco", new Taco());

@10kshuaizhang
Copy link

Too many errors in this book, I'm just at chapter2.

@zmbnz
Copy link

zmbnz commented Aug 30, 2023

its so important that import a special package. i had error in parsing b4 n after i changed some of them some of its issues got correct. check your import packages n download n add true .jar files to your project. for example aftef i added the code below for Converter interface some of issues disapeared. but for me it was more.
import org.springframework.core.convert.converter.Converter;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants