Bug #31380
DocComment of Form.ValidationResultsViewHelper is incorrect
| Status: | Resolved | Start date: | 2011-10-28 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Karsten Dambekalns | % Done: | 100% |
|
| Category: | ViewHelpers | |||
| Target version: | TYPO3 Flow Base Distribution - 1.0.5 | |||
| Has patch: | No | FLOW3 version affected: | Git 1.0 | |
| Votes: | 0 |
Description
The current DocBlock says:
* <f:form.validationResults>
* <f:if condition="{validationResults.flattenedErrors}">
* <ul class="errors">
* <f:for each="{errors}" as="error">
* <li>{error.code}: {error}</li>
* </f:for>
* </ul>
* </f:if>
* </f:form.validationResults>
(see the comment at the getFlattenedErrors() function:
Get a list of all Error objects recursively. The result is an array,
where the key is the property path where the error occured, and the
value is a list of all errors (stored as array))
so due to that error result nesting, it should read:
<f:form.validationResults>
<f:if condition="{validationResults.flattenedErrors}">
<dl class="errors">
<f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
<dt>{propertyPath}</dt>
<dd><dl>
<f:for each="{errors}" as="error">
<dt>{error.code}</dt>
<dd>{error}</dd>
</f:for>
</dl></dd>
</f:for>
</dl>
</f:if>
</f:form.validationResults>
(disregard the fact that I use dl's here, although I like them more when it comes to nestings)
Associated revisions
[BUGFIX] Fixes doc comment of Form.ValidationResultsViewHelper
The example in the class doc comment was outdated and is fixed with
this change.
Change-Id: I786d6a6e1005e5e47093617a66918afa048d5d47
Fixes: #31380
Releases: 1.0, 1.1
History
Updated by Karsten Dambekalns about 1 year ago
- Status changed from New to Accepted
- Assignee set to Karsten Dambekalns
- Target version set to 1.1
Updated by Gerrit Code Review about 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9478
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9478
Updated by Karsten Dambekalns about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f18764473d62d0b39b10b19cf98f680b07ee133d.
Updated by Karsten Dambekalns about 1 year ago
- Target version changed from 1.1 to 1.0.5
Updated by Gerrit Code Review about 1 year ago
- Status changed from Resolved to Under Review
Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/10752
Updated by Karsten Dambekalns 12 months ago
- Status changed from Under Review to Resolved
- FLOW3 version affected changed from Git master to Git 1.0