[TYPO3-mvc] Fluid: Complex forms best practice

Sebastian KurfŸürst sebastian at typo3.org
Thu Jul 9 20:12:12 CEST 2009


Hi Bastian,

> That does not work currently, cause the property mapper tries to 
> instantiate a class of type "array"..
> But this should be relatively easy to implement. what do you think?
Yes, we should make this work (in FLOW3 and in Extbase) - first in 
FLOW3, and then backport it.

However, I think the use cases for this are rather limited, as in most 
cases you'll either have just very few properties which are not 
encapsulated in objects, or you should build more complex objects.

I just had the idea of introducing another Fluid tag:
<f:form.objectContainer> (or something similar), to bind multiple 
objects to a given form.

Example:
<f:form>
<f:form.objectContainer object="{myUser}" name="myUser">
<f:form.textbox property="username" />
</f:form.objectContainer>

<f:form.objectContainer object="{mySpecialLoginData}" 
name="mySpecialLoginData">
<f:form.textbox property="age" />
</f:form.objectContainer>

</f:form>.

What do you think of such an idea? It would be rather easy to implement, 
albeit I do not like the naming yet.

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list