A strange thing regarding this topic. I can't understand where's the problem.
Everytime I call the method with the observeField, all my Session data is lost and so I'm disconnected. It's the first time I'm using Ajax+AjaxHelper+Cake, so I could do something wrong. When I remove the observeField call, everything is fine. Here is the code of the methods: <?php // app/controllers/projects_controller.php class ProjectsController extends AppController { ... function beforeFilter(){ parent::beforeFilter(); array_push($this->helpers,"ajax"); } ... function webAlias(){ if(isset($this->data["Project"]["name"])){ $this->layout = "ajax"; $this->autoRender = false; echo $this->_webAlias($this->data["Project"]["name"]); } } } ?> <?php /* * /app/app_controller.php */ class AppController extends Controller { ... function beforeFilter(){ parent::beforeFilter(); $aro = ALL; if($this->Session->check(ID)){ $aro = $this->Session->read(ARO); } if(isset($this->params["controller"]) && isset($this->params["action"])){ if($this->checkAccess($this->params["controller"],$this->params["action"],$aro)){ }else{ $this->redirect("/pages/denied"); exit; } } } /** * return a web alias starting from a provied string * * @param $string the provided string to be parsed * @return the translated string */ function _webAlias($string){ $ret = trim(strtolower($string)); $ret = preg_replace("/[ ]/","-",$ret); $ret = preg_replace("/^[-]+/","",$ret); $ret = preg_replace("/[-]+\$/","",$ret); $ret = preg_replace("/[^a-z0-9-]/","",$ret); return $ret; } ... } ?> -- Live life like you're gonna die. Because you're gonna. William Shatner --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---