This is my first time posting and my English is not very good. First of all, thanks for this awesome framework. I'm newbie with CI an CJAX. I'm trying to develop a web application using the following FWs:
- CodeIgniter 2.1.0
- DataMapper ORM 1.8.2.1
- Ocular Template Library
- AJAXFW_4CI_5.0RC2
My question is quite simple: Does anyone get DataMapper working over CJAX? Is it possible? I had some issues installing CJAX, which I solved by linking 'cjax' folder into 'system/core'. Moreover I changed 'ajaxfw.php' and 'ajax.php' as you said in previous posts.
Right now I can work with CJAX, but I've got some problems when using DataMapper into AJAX controllers (in 'application/response'). You can see one of my controllers in the code below:
Code:
public function save_client()
{
$this->load->library('datamapper');
$ajax = ajax();
echo "Error 0";
$u = new User();
echo "Error 1";
// Recibe los datos del nuevo cliente
$u->email = $this->input->post('email');
$u->password = $this->input->post('password');
$u->name = $this->input->post('name');
$u->surname = $this->input->post('surname');
$u->company = $this->input->post('company');
$u->telephone = $this->input->post('telephone');
$u->nif = $this->input->post('nif');
$u->type = 1;
$u->confidence = 0;
$u->status = 0;