Re: Being cached ?
I think my problem is to have these headers (find in www.php.net/header) : Which part of this code can be place in cakephp ? Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > > I suppose it's worth a shot, if you really think it's something on the > client side. I currently using Opera most of the time. I do download and try Firefox and the view seems ok for edit operation. It did refresh even without autocomplete="off". Hm then it has to do with Opera then. I still suspect that some HTTP headers that need to be sent but don't know which ones :) Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
Well, that eliminates the the easy fixes, then. Hmm... The only time I ever had something like that happen with my code was with a password field that FireFox was autofilling with a stored password. I fixed it by setting the autocomplete attribute to off in my form tag, e.g.: I suppose it's worth a shot, if you really think it's something on the client side. On Jul 13, 9:27 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > > > Nothing in particular jumps out at me in the code... have you checked > > to make sure that the form data is being stored in $this->data > > properly when you submit? No extra or missing arrays within arrays? > > Hi kionae, > > No.. everything is okay. I try it again, and it seems to be on client > side problem. As everytime I click edit and refresh the page, it > returns the current value. Hm, what should I do to make sure the > client (browser) always fetch the current value as I click the edit > link. > > Thanks, > > Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > Nothing in particular jumps out at me in the code... have you checked > to make sure that the form data is being stored in $this->data > properly when you submit? No extra or missing arrays within arrays? > Hi kionae, No.. everything is okay. I try it again, and it seems to be on client side problem. As everytime I click edit and refresh the page, it returns the current value. Hm, what should I do to make sure the client (browser) always fetch the current value as I click the edit link. Thanks, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
Nothing in particular jumps out at me in the code... have you checked to make sure that the form data is being stored in $this->data properly when you submit? No extra or missing arrays within arrays? On Jul 13, 3:05 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > On 7/13/07, majna <[EMAIL PROTECTED]> wrote: > > > > > Must be something else. Paste controller code. > > Hi Majna, > > This is my code > > == > class ProductsController extends AppController { > > var $name = 'Products'; > var $helpers = array('Html', 'Form' ); > > function index() { > $this->Product->recursive = 0; > $this->set('products', $this->Product->findAll()); > } > > function view($id = null) { > if (!$id) { > $this->Session->setFlash('Invalid id for Product.'); > $this->redirect('/products/index'); > } > $this->set('product', $this->Product->read(null, $id)); > } > > function add() { > if (empty($this->data)) { > $this->set('users', > $this->Product->User->generateList()); > $this->render(); > } else { > $this->cleanUpFields(); > if ($this->Product->save($this->data)) { > $this->Session->setFlash('The Product has > been saved'); > $this->redirect('/products/index'); > } else { > $this->Session->setFlash('Please correct > errors below.'); > $this->set('users', > $this->Product->User->generateList()); > } > } > } > > function edit($id = null) { > if (empty($this->data)) { > if (!$id) { > $this->Session->setFlash('Invalid id for > Product'); > $this->redirect('/products/index'); > } > $this->data = $this->Product->read(null, $id); > $this->set('users', > $this->Product->User->generateList()); > } else { > $this->cleanUpFields(); > if ($this->Product->save($this->data)) { > $this->Session->setFlash('The Product has > been saved'); > $this->redirect('/products/index'); > } else { > $this->Session->setFlash('Please correct > errors below.'); > $this->set('users', > $this->Product->User->generateList()); > } > } > } > > function delete($id = null) { > if (!$id) { > $this->Session->setFlash('Invalid id for Product'); > $this->redirect('/products/index'); > } > if ($this->Product->del($id)) { > $this->Session->setFlash('The Product deleted: id > '.$id.''); > $this->redirect('/products/index'); > } > } > > } > > ?> > == > > Thanks for any suggestion ! > > Regards, > > Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
On 7/13/07, majna <[EMAIL PROTECTED]> wrote: > > Must be something else. Paste controller code. Hi Majna, This is my code == Product->recursive = 0; $this->set('products', $this->Product->findAll()); } function view($id = null) { if (!$id) { $this->Session->setFlash('Invalid id for Product.'); $this->redirect('/products/index'); } $this->set('product', $this->Product->read(null, $id)); } function add() { if (empty($this->data)) { $this->set('users', $this->Product->User->generateList()); $this->render(); } else { $this->cleanUpFields(); if ($this->Product->save($this->data)) { $this->Session->setFlash('The Product has been saved'); $this->redirect('/products/index'); } else { $this->Session->setFlash('Please correct errors below.'); $this->set('users', $this->Product->User->generateList()); } } } function edit($id = null) { if (empty($this->data)) { if (!$id) { $this->Session->setFlash('Invalid id for Product'); $this->redirect('/products/index'); } $this->data = $this->Product->read(null, $id); $this->set('users', $this->Product->User->generateList()); } else { $this->cleanUpFields(); if ($this->Product->save($this->data)) { $this->Session->setFlash('The Product has been saved'); $this->redirect('/products/index'); } else { $this->Session->setFlash('Please correct errors below.'); $this->set('users', $this->Product->User->generateList()); } } } function delete($id = null) { if (!$id) { $this->Session->setFlash('Invalid id for Product'); $this->redirect('/products/index'); } if ($this->Product->del($id)) { $this->Session->setFlash('The Product deleted: id '.$id.''); $this->redirect('/products/index'); } } } ?> == Thanks for any suggestion ! Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
Must be something else. Paste controller code. On Jul 13, 4:49 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > > > Are you sure the database is actually updating, and you're not just > > being redirected to the list view without seeing an error message? > > Yes, it is updating. It seems like it has to do with browser cache and HTTP > header, but I don't know how to do it here. > > Regards, > > Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
On 7/13/07, kionae <[EMAIL PROTECTED]> wrote: > > > Are you sure the database is actually updating, and you're not just > being redirected to the list view without seeing an error message? Yes, it is updating. It seems like it has to do with browser cache and HTTP header, but I don't know how to do it here. Regards, Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Being cached ?
Are you sure the database is actually updating, and you're not just being redirected to the list view without seeing an error message? On Jul 12, 10:35 am, "Feris Thia" <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm generating controller code & view based on models I created. One thing > I concern is the 'freshness' of the data view. > > I did these things : > 1. Viewing a data list, clicking edit link that brings me to a data form > with all the data values > 2. Giving all fields new values. Save it, and the code bring me back to data > list view > 3. I click edit on that data row again, and it still holds the old value > (1) !! > > How do I modify the code to tell browser to fetch new data ? > > Regards, > > Feris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---