Created
October 21, 2014 15:28
-
-
Save helhum/884928ba589f5e28e6b7 to your computer and use it in GitHub Desktop.
Ordered validation results
This file contains 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
<f:form.validationResults for="{propertyPath}"> | |
<f:if condition="{validationResults.flattenedErrors}"> | |
<ul> | |
<f:for each="{validationResults.flattenedErrors}" as="errors"> | |
<li> | |
<ul> | |
<f:for each="{errors}" as="error"><li>{error}</li></f:for> | |
</ul> | |
</li> | |
</f:for></ul> | |
</f:if> | |
</f:form.validationResults> |
This file contains 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
Description: | |
<f:render partial="FormErrors" arguments="{propertyPath: 'newExample.description'}"/> | |
Title: | |
<f:render partial="FormErrors" arguments="{propertyPath: 'newExample.title'}"/> | |
<f:form action="create" enctype="multipart/form-data" name="newExample" object="{newExample}"> | |
<label for="title">Title:</label><f:form.textfield property="title" /> | |
<label for="description">Description:</label><f:form.textfield property="description" /> | |
<f:form.submit value="Create new" /> | |
</f:form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment