Hello I have read the chapter with closer attention and solved my
first problem.
Now i have another problem :)
using the subform symphony saves first the "father form" and them the
"children forms" is there a way to do this the opposite? First save
the  "children forms" ?

This is because a want to have a sum column in the invoice, and the
values of lines are not in the database!

Thank you for you help!

On Mar 31, 2:05 pm, Massimiliano Arione <garak...@gmail.com> wrote:
> Did you read the entire chapter?
> Seehttp://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-F...
>
> cheers
> Massimiliano
>
> On 30 Mar, 19:56, Veríssimo <jveriss...@gmail.com> wrote:
>
> > The echo was just a debug line, but I should only use the embed form
> > only if the $this->getObject() != null. Because when it is null the
> > embed form(Invoiceline) is saved with the variable invoiceid = null.
>
> > thank you.
>
> > On Mar 30, 2:20 pm, Massimiliano Arione <garak...@gmail.com> wrote:
>
> > > You don't need to check.
> > > The getObject() method returns null if no object associated, and this
> > > is fine with form instance.
> > > Just avoid to echo object's id in the form's configure.... why are you
> > > doing this???
>
> > > cheers
> > > Massimiliano
>
> > > On 30 Mar, 01:07, Veríssimo <jveriss...@gmail.com> wrote:
>
> > > > I have implemented this, but i only have the Object after a previous
> > > > have saved it.
>
> > > > Do i have to do something like check ($this->getObject()) as a object?
>
> > > >   public function configure()
> > > >   {
> > > >    $subForm = new sfForm();
> > > >   for ($i = 0; $i < 2; $i++)
> > > >   {
> > > >     $linharecibo = new Linharecibo();
> > > >     $linharecibo->Recibo = $this->getObject(); #This line does not
> > > > have a object the first time
> > > >     echo 'Raios'.$linharecibo->Recibo->getId();
> > > >     $form = new LinhareciboForm($linharecibo);
>
> > > >     $subForm->embedForm($i, $form);
> > > >   }
> > > >   $this->embedForm('Linhas', $subForm);
>
> > > >   }

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to