Code: Select all
<blc:form th:object="${entityForm}"
method="POST"
class="twelve columns custom entity-form"
th:classappend="${(additionalClasses == null ? '' : additionalClasses + ' ')
+ (additionalControllerClasses == null ? '' : additionalControllerClasses)}"
th:action="@{${currentUrl}}"
th:with="renderTabs=${#lists.size(entityForm.tabs) > 1 or (showSingleTab != null and showSingleTab)}">
<div class="errors" blc_admin:errors="*{*}" th:if="${#fields.hasErrors('*')}">
<div class="tabError" th:each="tab : ${tabErrors.entrySet()}" th:inline="text">
<b>[[#{__${tab.key}__}]]</b>
<span class="fieldError error" th:each="field : ${tab.value.entrySet()}">
[[#{__${field.key}__}]]: [[#{__${field.value}__}]]
</span>
<br />
</div>
</div>
</blc:form>
Code: Select all
public class EntityForm {
// This is used to data-bind when this entity form is submitted
protected Map<String, Field> fields = null;
}
I don't understand ${#fields.hasErrors('*')},
I check entityform has a field fields, but it doesn't has method 'hasErrors',
how does it work? thanks.