[TYPO3-dev] Bug in ForViewHelper -> only first element shown

Philipp philippwrann at gmx.at
Wed Aug 28 08:58:45 CEST 2013


I think it is a problem you set your QueryResult in your demand object. The QueryResult is still a object and when you pass it to your foreach it gets transformed but the reference is still in your demand object. You expect a ObjectStorage anyway in the demandObject, so why dont check for the type and simply set the QueryResult as property? That seems a little confuising and might cause the problem.

Additionially your f:form property name should be exchanged with objectName.
The checkbox viiewHelper cant be bound to ObjectStorages, only to boolean and array properties, so your demand object contains one more error. The demand is transient anyway, so why use a persistent storage object?

You dont have to define the objectmanager in your actioncontroller, its allready there inherited from its parent. Saves you a view lines of code.

First i would define the demand-property as array and assign your results as array (QueryResult->toArray()).
Otherwise you would have to iterate over the QueryResult and attach Object by Object to your objectStorage.



More information about the TYPO3-dev mailing list