[TYPO3-mvc] Fluid Form Errors with new property-mapper Extbase 1.4

Wolfgang Rock Wolfgang.Rock at comnex.net
Wed Nov 16 21:12:58 CET 2011


Hi list,

I'm using TYPO3 4.6.0 with Extbase 1.4 with new property-mapper and came about the problem that the ErrorForms.html Fluid-template, which is generated by the extension-builder did not display any errors.
After debugging I found that the ErrorForms-content is deprecated, but the way how to do it in the class-comment of Tx_Fluid_ViewHelpers_Form_ValidationResultsViewHelper  is still the old one.

After putting following code from FLOW3 into FormErrors.html, it worked as expected (you have to replace {object} with the objectModel the form is made for):

<f:form.validationResults for="{object}">
    <f:if condition="{validationResults.flattenedErrors}">
        <ul>
                <f:for each="{validationResults.flattenedErrors}" key="propertyPath" as="errors">
                    <li>
                        {propertyPath}: <ul>
                            <f:for each="{errors}" as="error"><li>{error}</li></f:for>
                        </ul>
                    </li>
                    
                </f:for>
                </ul>
    </f:if>
</f:form.validationResults>


Cheers,
Wolfgang Rock


 



More information about the TYPO3-project-typo3v4mvc mailing list