[TYPO3-mvc] Model object tree building with Tx_Extbase_Persistence_ObjectStorage property

Claus Fassing claus at fassing.eu
Sat Sep 25 21:47:46 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I get in trouble with a Tx_Extbase_Persistence_ObjectStorage defined
field as follow

Entry (root object)
 title (string)
 company (Company object)
 [...]

Company
 name (string)
 contact (Tx_Extbase_Persistence_ObjectStorage of Person object)
 [...]

Person
 forename (string)
 lastname (string)
 [...]

<f:form method="post" action="create" name="entry" object="{entry}">	
  <f:form.textbox property="company.name" id="companyname" />
	<f:form.textbox property="company.contact.forename" id="forename"/>		 			
	<f:form.textbox property="company.contact.lastname" id="lastname"/>
</f:form>
				
I can write on the field name of company object (company object will
created),
but writing on forename or lastname always failed with
#1251814355: transformToObject() accepts only numeric values and arrays.

Then I try to create Person in the action and add it.
$contact = t3lib_div::makeInstance('Tx_Myext_Domain_Model_Person');
$entry->getCompany()->addContact($contact);
$this->view->assign('entry', $entry);

But I get the same error message.

Are there any restrictions with Tx_Extbase_Persistence_ObjectStorage in
the domain model and forms ?

Regards Claus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMnlHhAAoJELsIv+audObfJlwIANo906cCTL1TcLgWU/0Ta7ta
qtWQ8fDi4zrg9o/7SB4RVmdCCUMZwN0IByf5/aL0qH3Dw4wktn5n30pRTuLxhZo+
CIb69g5PW+v8H4XNTfna4t6b4iOtZ0pCoRdBlyyf6bemYohyUw9Jmfc18k3mFUXR
4Hr4lf+Zf0HHxV3BaEqD5NJRk5V8L7ehJj9POGG5Yfealvl4pWFrCTGyi8u9Xuz/
tTFd6HgMTHz8zi3dNFigX/x0UoM/1d1fFBo6p4oRwnC/6iGS/AU8fADDW1LbqDhq
eOOAEwFrN3r8Ms16YRRIvosPDPOTuJJKdwja0XSZBc9l9ds+sDduUi/7Gs0LTHk=
=NCDF
-----END PGP SIGNATURE-----


More information about the TYPO3-project-typo3v4mvc mailing list