Open
Conversation
- fix Thymeleaf deprecation warning regarding fragment reference - remove obsolete (?) th:block element - simplify boolean expression in th:if (remove '== true') - move form element for editing team to fragment - put attributes on separate lines
holgergp
reviewed
Jan 5, 2023
| <th:block th:if="${team.editMode == false}"> | ||
| <div th:insert="fragments :: showTeam" th:remove="tag"/> | ||
| </th:block> | ||
| <div th:if="${team.editMode}" th:insert="~{fragments :: editTeam}" th:remove="tag"/> |
Owner
There was a problem hiding this comment.
Hattest du das ausprobiert? Ich habe (irgendwo bei SO) gelesen, dass aus Gründen ein insert eine höhere Präzedenz als ein if hat. 🤷
holgergp
reviewed
Jan 5, 2023
| <div th:fragment="soccer-table" th:remove="tag"> | ||
|
|
||
| <div th:insert="fragments :: position(${team})" th:each="team : ${soccerTable.positions}" th:remove="tag"> | ||
| <div th:insert="~{fragments :: position(${team})}" th:each="team : ${soccerTable.positions}" th:remove="tag"> |
holgergp
reviewed
Jan 5, 2023
| <form id="soccer-table" | ||
| class="soccer-table sortable" | ||
| hx-post="/soccerTable" | ||
| hx-trigger="end" |
Owner
There was a problem hiding this comment.
Jo! Nice!
Gibt es prettier drüben bei euch? Ok Fangfrage! 😁
holgergp
reviewed
Jan 5, 2023
| <div th:fragment="editTeam" th:remove="tag"> | ||
| <input name='teamName' th:value="${team.name}" form="edit-soccer-table"/> | ||
| <input type='hidden' name='teamId' th:value="${team.id}" form="edit-soccer-table"/> | ||
| <form id="edit-soccer-table" hx-post="/saveSingleTeam" hx-swap="innerHTML" hx-target="#soccer-table"> |
Owner
There was a problem hiding this comment.
Dann habe ich doch nested Forms, oder? Das wollte ich verhindern mit dem Auslagern nach oben.
holgergp
reviewed
Jan 5, 2023
| implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
| implementation("io.github.wimdeblauwe:htmx-spring-boot-thymeleaf:2.0.0") | ||
| implementation("org.springframework.boot:spring-boot-devtools") | ||
| developmentOnly("org.springframework.boot:spring-boot-devtools") |
Owner
There was a problem hiding this comment.
Oh! Ich hatte doch schon die Dev-Tools! Oder muss ich da noch mehr machen? Erkennt intellij das automatisch? Oder macht Gradle da was?
(Das hatte bei mir bislang keinen merkbaren Einfluss)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.