[Flow] identifier gets lost in form

Winfried Mingst wm at psoft.at
Sat Jun 29 09:04:05 CEST 2013


Hi Mark,

I allready tried it with the cookbook's help before.  See my post from
17.05.13 "Exception after validation error".
There was also the problem that identifiers were renewed in case of a
validation error. How did you solve that?

On IRC I was told that if there is a relation between models it should work
without a dto also.

Did you define relations between your models (1:1,1:n,...)? 
Here you can find my samplecode:
http://github.com/regioadmin/WL.Test/blob/912f1a2573bac3eabf848f98eb54a33689
5307cf/Classes/WL/Test/Controller/MasterController.php

Regards
Winfried

-----Ursprüngliche Nachricht-----
Von: flow-bounces at lists.typo3.org [mailto:flow-bounces at lists.typo3.org] Im
Auftrag von Mark Kuiphuis
Gesendet: Samstag, 29. Juni 2013 06:32
An: flow at lists.typo3.org
Betreff: Re: [Flow] identifier gets lost in form

On 29/06/13 12:12 AM, Winfried Mingst wrote:
> Hi Flowx,
>
> I try to edit properties of two models in one form desperately.
> There is a "master" and "detail" model/entity (1:1 unidirectional
> relation, "detail" holds foreign key @ORM OneToOne(
> cascade={"persist","remove"}))
>
> Source code of edit form shows identifiers of both models initialy:
>
> <input type="hidden" name="detail[__identity]" value="20390230..." />
> <input type="hidden" name="detail[master][__identity]"
> value="91a3aa0..." />
>
>
> BUT if the form is reloaded in case of a validation error, the 2nd
> hidden field gets lost!
> The result is a duplicate dataset in table master when the form is
> resubmitted.
>
> here is my Controller
>
https://github.com/regioadmin/WL.Test/blob/master/Classes/WL/Test/Controller
/DetailController.php
>
> here is my edit form
>
https://github.com/regioadmin/WL.Test/blob/master/Resources/Private/Template
s/Detail/Edit.html
>
>
>
> What's wrong?  Do I need some additional subPropertyMapping config?
>
> thx
>
> Winfried

Hi Winfried,

Maybe this is of any help you. At least it helped me creating and 
updating 2 and 3 objects in one Fluid form:

http://wiki.typo3.org/Flow_Cookbook#Create_multiple_objects_with_one_Fluid_f
orm
_______________________________________________
Flow mailing list
Flow at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list