[TYPO3-mvc] form inside partial updating property - how to do?

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Mon Jan 23 15:39:57 CET 2012


Hello typo3-mailinglist!

Today I'm looking for solution to do the following:
My "main"-object called "accreditation" has some childs called "person". In
my list-View there is a Partial, showing each of the assigned person
(oneperson). If no name is set, a form is shown to enter the name and other
values. "aid" is a separate id - generated by accreditation-create and set
at this time. For each "person" there is one form, to save person by person.
I tried the following fluid-code:
<f:form method="post" action="update" name="person" object="{oneperson}"
arguments="{aid:oneperson.aid}">
<f:form.textbox property="firstname" />

The controller looks like this:
/**
* Updates an existing Accreditation (saving single Persons) and forwards to
the list action afterwards.
*
* @param Tx_PsoaAccredit_Domain_Model_Person $person
*/
public function updateAction(Tx_PsoaAccredit_Domain_Model_Person $person) {
                if($person){          
                               $this->personRepository->update($person);
                               $this->flashMessageContainer->add('Your
Accreditation was updated.');
                               $this->redirect('list');
                }
                else{
                               $this->flashMessageContainer->add('Something
shitty happend.');
                               $this->redirect('list');
                }
}
If I send the form, I get an error "An error occurred while trying to call
Tx_PsoaAccredit_Controller_AccreditationController->updateAction()"

What's wrong at this point? 

 

Best regards

Johannes



More information about the TYPO3-project-typo3v4mvc mailing list