[TYPO3-mvc] fluid action link and hidden Objects
Jonas Götze
jonnsn at gmail.com
Thu May 20 17:00:50 CEST 2010
Hi,
Now I have a similiar Problem with an editForm.
If the object is hidden, I get an error
Tx_Extbase_MVC_Exception_InvalidArgumentValue
which tells me that my value is an Array instead of an object of my Type.
If I print_r the object in extbase/Classes/MVC/Controller/Argument.php
-> transformValue()
I can see its an Array with the formfieldnames as key and the values of
them.
I read here in the list, that this is due to a typo in most cases - but
in my case it works with the records where hidden is 0. So I guess this
is not the case.
I suppose there is an other call for getByUid somewhere when building
the object from the form values (looking for it)?
To got it working for the non-hidden records I had to call the
replace()-function instead of update(), since there (in Repository.php)
the existing object is also found with findByUid, which does not select
hidden fields. So I selected the existing object by myself and replaced
it with the new one.
To get it working for the hidden-fields, I guess I have to take the
array of the form and transform it by myself too?
Thx for your hints and your oppinion on that!
I know that the handling of hidden fields will be refactored in upcoming
versions (lots of long discussions here) - but: has this particular
behaviour with update and the objectMapping already been noticed yet?
Regards
Jonas
Am 19.05.2010 14:54, schrieb Jonas Götze:
> Hi list,
>
> me again :)
> I have another weird problem with hidden records.
> I do have a list of records (hidden and visible ones) in a table now. I
> created some f:link.action to the editAction for example, which gets the
> object as argument. This (edit and update) works fine for all Objects
> where hidden is 0 - but not for those with hidden = 1.
> If I call the link for those I get
>
> Tx_Extbase_MVC_Exception_InvalidArgumentValue
>
> The value must be of type "Tx_Myext_Domain_Model_Foo", but was of type
> "NULL".
>
> I guess creating the Object before it can be passed to my action fails,
> due to its visibility?
>
> Any Ideas?
> Thanks to all of you for your generous help! :)
>
> Regards
> Jonas
More information about the TYPO3-project-typo3v4mvc
mailing list