Yohan 'rouKs' G. wrote:
> <code>
> public function executeEdit(sfWebRequest $request)
> {
> $this->news = NewsPeer::retrieveByPK($this-
>> getRequestParameter('id'));
> $this->id = $this->getRequestParameter('id');
This should be:
$this->id = $request->getParameter('news[id]');
as all parameters are in the news array.
Fabien
> $this->form = new NewsForm(NewsPeer::retrieveByPK($this->id));
> if ($request->isMethod('post'))
> {
> $this->form->bind($request->getParameter('news'));
> if($this->form->isValid())
> {
> $this->form->updateObject()
> $this->form->save();
> $this->getUser()->setFlash('notice', 'Ok');
> }
> }
>
> }
> </code>
>
> Here's my code, it is not complex so i don't understand who's the
> problem :/
>
> NewsForm is a propel-generated class wich wasn't been modified
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---