[TYPO3-mvc] Re: How to dynamically create objects

Joerg Schoppet joerg at schoppet.de
Mon May 20 11:40:13 CEST 2013


Hey,

I'm using a clean TYPO3 CMS 6.1 installation.

Regarding the TypoScript Object-Browser the value of
"config.tx_extbase.features.rewrittenPropertyMapper ="
is set to 1.


After further investigation (don't know the solution, yet) I think the "problem" is coming from the hidden form-field
__trustedProperties
<input type="hidden" name="tx_extension_display[__trustedProperties]" value="a..." />


My current rough workaround is:
- I create in the view 20 positions
- The rendered view now has in "__trustedProperties" all fields of these 20 positions
- With javascript I delete 19 of the 20 positions !!!
- Now the user can "dynamicall" add up to 20 positions

This is really rough and a lot of meaningless data is transfered from server to client to let this happen because in average only up to 10 positions are created, but there may be circumstances where the 20 positions are needed.


I'm facing the same problem if a user wants to modify an existing order and wants to add additional positions:
- I have to "pseudo" create the positions and then delete them to let the user the possibility to create additional ones


I want to do it the right extbase/fluid way and would also offer to write a wiki-entry as "Best Practice", because this kind of question comes up a lot over time regarding the forum.


Thanks


Joerg


More information about the TYPO3-project-typo3v4mvc mailing list