[TYPO3-mvc] New property mapper and demand object

Eike Starkmann starkmann at undkonsorten.com
Tue Oct 8 12:08:03 CEST 2013


Hi,

i have the following situation:

I got an demand object in which a search word is stored ('subject').
And i build an pagebrowser which has the parameter of the demand object
so that you can browse through the search results. I'm using the new
property manager.

But when i click on a pagebroswer link i get the following error:


#1297759968: Exception while property mapping at property path
"":Creation of objects not allowed. To enable this, you need to set the
PropertyMappingConfiguration Value "CONFIGURATION_CREATION_ALLOWED" to TRUE

I know that i have to allow the property to be build. My code:

protected function initializeAction(){
if($this->request->hasArgument('demand')) {
/* @var
\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration
$propertyMappingConfiguration */
	$propertyMappingConfiguration =
$this->arguments->getArgument('demand')->getPropertyMappingConfiguration();
		
$propertyMappingConfiguration->allowCreationForSubProperty('demand.subject');
			
$propertyMappingConfiguration->allowCreationForSubProperty('demand');		$propertyMappingConfiguration->allowProperties('demand.subject');
		
}
}

When i debug the configuration it says:
http://pastebin.com/aYMAQWUL

So what is the problem here? Why do i even have to allow demand.subject
to be created? Demand is an value object which is never persisted and
just used as DTO.


Thanks, Eike Starkmann


More information about the TYPO3-project-typo3v4mvc mailing list