[TYPO3-mvc] rewritten property manager and multiple objects in one form

Pascal Cramer pascal at roguesheep.nl
Thu Oct 18 15:57:41 CEST 2012


Hi gents,

I am just staring out on my adventures with Extbase and Fluid and I 
think I am missing out on some info.
It seems to me you are probably discussing the solution I am looking 
for but I cannot put all the pieces together.

I have an parent-child 1:n relation (card - contacts) and I would like 
to create a new child object in the parent's edit-form.
The editing of child objects in the same form works out-of-the-box with 
the Extension builder code using the notation:
  <f:form.textfield name="card[contacts][{contact.uid}][firstName]" />
  <f:form.hidden name="card[contacts][{contact.uid}][__identity]" 
value="{contact.uid}"/>

But what notation should I use for the new child object?
If I use
  <f:form.textfield property="crisisCard[contacts][newContact][firstName]" />
and try to check for it using

    public function initializeUpdateAction() {
        if ($this->arguments['newContact']) {
            $contactConfiguration = 
$this->arguments['newContact']->getPropertyMappingConfiguration();
[….snip…]
Extbase throws me a:
  #1216909923: The argument "newContact" does not exist.

What am I missing here? (feeling very noobish :-)


Thanks,
Pascal

On 2012-10-16 12:44:30 +0000, Stefano Cecere said:

> Hi Arjien
> 
> i'm really curious: where did you find docs about the New Property 
> Mapper? apart 
> http://flow.typo3.org/documentation/guide/partiii/propertymapping.html 
> i didn't find anything!
> 
> ps: how is it that you and Henjo Hoeksma have such similar surnames!?!? 
> incredible! :)
> 
> ciao
> stefano
> 
> On 16/10/12 14:24, Arjen Hoekema wrote:
>> Hi Henjo,
>> 
>> Did you tell the propertymapper that creation/modification of the
>> subproperties is allowed:
>> 
>> protected function initializeCreateAction() {
>> 
>> $this->arguments['person']->getPropertyMappingConfiguration()->allowCreationForSubProperty('address'); 
>> 
>> 
>> $this->arguments['person']->getPropertyMappingConfiguration()->allowCreationForSubProperty('address.first'); 
>> 
>> 
>> }
>> 
>> Same goes for "allowModificationForSubProperty" when doing updates with
>> nested objects.
>> 
>> Kind regards,
>> 
>> Arjen Hoekema




More information about the TYPO3-project-typo3v4mvc mailing list