Hi Sam Thanks for your kind Reply.
i changed the edit function still i have that issue..
i thought better understanding of my functionality will help you
better to help me..
If don't mind i would send my entire code and my table structure, so
that i can get exactly what i whant
can you help me in this, please?

Thanks in  advance

with Regards
kalai.


On Feb 17, 3:30 pm, Sam Sherlock <[email protected]> wrote:
> @kalai
> you need to check that $this->data is not empty when adding a building
>
> been a while since I used 1.3 but I just baked a project after updating
> my base of 1.3
>
> I put you code in first without validation in the model (my view were
> baked too)
>
> I have not trouble editing buildings or adding new entries (after the
> change on the if state of the add method - guess that was typo which is
> why  baking is soo nice)
>
> next I added the validation code.
>
> I am not sure what your exact setup is for the buildings table or the
> intended purpose of each field.
> I see the identifier to my thinking this looks like your making an seo
> friendly retrival field (if so look at the various slug behaviours out
> there CakeDC Utils or Deuromark Tools plugins)
>
> I see that in your views you are hard setting some stuff (certainly not
> something I would do)
>
> I am happy to give your actual sql setup a whirl if you like.
>
> Also someone may well spot something I have missed
>
> (I did not encounter that issue with the edit action)
>
> On 17/02/2012 20:23, kalai wrote:
>
>
>
>
>
>
>
> > function add() {
> >            if (!empty($this->data)) {
> >                    $this->Building->create();
> >                    if ($this->Building->save($this->data)) {
> >                            $this->Session->setFlash(__('The building has 
> > been saved', true));
> >                            $this->redirect(array('action' =>  'index'));
> >                    } else {
> >                            $this->Session->setFlash(__('The building could 
> > not be saved.
> > Please, try again.', true));
> >                    }
> >            }
> >    }

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to