Re: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Kalaiarasan Eswaramoorthy
Thank you Sam, for your kind reply building is one of the functionality,
like Building there are Department,People,User,Group..etc..

I edited add function but still it has some other issues pooping up..
if you don't mind i would send my entire code and my table structure.?
can you help me please?

Thanks in Advance..
Regards
Kalai
On Fri, Feb 17, 2012 at 3:30 PM, Sam Sherlock sam.sherl...@gmail.comwrote:

 @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
 cake-php+unsubscribe@**googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/**group/cake-phphttp://groups.google.com/group/cake-php


-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Kalaiarasan Eswaramoorthy
Hi Thanks, first of all i am starting to edit already existing code
developed in 1.3 version..
i added some actions in it , as i am new to cakePHP i just followed the
tutorial...
in this i am attaching the entire code.
so please help to figure it out...

please find the attachment

regards
Kalai

On Fri, Feb 17, 2012 at 5:48 PM, Sam Sherlock sam.sherl...@gmail.comwrote:

  Building there are Department,People,User,Group..**etc..

 I was hoping to see the sql and the problem model  controller
 with the code being in bin.cakephp.org or github gist

 have you got debug on in your app?
 have you got debug_kit? its a must really

 when you get an isssue with some controller action you can use
 $this-log($aVartoDebug, 'file-to-save-it-in');
 this will make a log file in tmp/logs and put the value of the first arg

 also is you have a controller working comparing it with the one that does
 not is very helpful.

 Overall though taking some time to complete the blog tutorial and redo it
 adding more
 will teach  you much.

 setting up bake will save you from many annoying human error typos and
 save lots of time.
 Its or so very easy to setup

 finally if you are starting out why start with 1.3 when you could just
 start with 2.0?



 On 17/02/2012 21:57, kalai wrote:

 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 
 Sherlocksam.sherl...@gmail.**comsam.sherl...@gmail.com
  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
 cake-php+unsubscribe@**googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/**group/cake-phphttp://groups.google.com/group/cake-php


-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php