Error im parameter in method save

dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
view: “scheduler”,
id: “scheduler”

                });
                dhx.i18n.fullDateFormat = "%Y-%m-%d %H:%i";
                
                var dp = new dhx.DataProcessor({
                    master:$$('scheduler')
                });
                dp.action_param ="dhx_editor_status";
               dhx.dp($$("scheduler")).config.url = "../agenda/data";                     
                $$('scheduler').$$('dayList').define("firstHour", 7);
                $$('scheduler').$$('dayList').define("lastHour", 22);
              
                $$("scheduler").$$('month').show();
                $$("scheduler").load(arquivoxml,"scheduler");
                $$("scheduler").config.save = "../agenda/data";  
            });

Using mobile scheduler component, I have an error in the method of saving and editing.

He did not save data.

The callback function is seeking the data correctly, but can not write the data.

public function data () {

 $ This-> load-> database ();
 $ Connector = new JSONDataConnector ($ this-> db, "PHPCI");
 $ Connector-> enable_log ("temp.log");
 $ Connector-> render_table ("dist_agenda", "id", "start_date (start_date), end_date (end_date), text (text), observation (details) id_cliente");

}

If you run the data () function returns the check:

[{“Id”: “36”, “start_date”: “03/01/2013 16:00:00”, “end_date”: “01/03/2013 16:30:00”, “text”: "Visit “” details “,” - “,” id_cliente “,” 487 “}, {” id “,” 35 “,” start_date “,” 01/03/2013 15:00:00 “,” end_date “:” 01.03.2013 15:30:00 “,” text “:” Visit “,” details “:” Scheduling Previous: 28 \ / 02 \ / 2013 20:00:00 “,” id_cliente “:” 1484 "} , {“id”: “34”, “start_date”: “03/01/2013 09:00:00”, “end_date”: “01/03/2013 09:30:00”, “text”: "Visit “,” details “:” Scheduling Previous: 28 \ / 02 \ / 2013 21:00:00 - “,” id_cliente “:” 973 “}, {” id “:” 33 “,” start_date “:” 2013 - 03-01 08:00:00 “,” end_date “:” 03/01/2013 08:30:00 “,” text “:” Visit “,” details “: null,” id_cliente “:” 507 "}, {“id”: “32”, “start_date”: “02/28/2013 21:00:00”, “end_date”: “02/28/2013 21:30:00”, “text”: “Visit” , “details”: null, “id_cliente”: “973”}, {“id”: “31”, “start_date”: “28/02/2013 20:00:00”, “end_date”: "2013-02 -28 22:00:00 “,” end_date “:” 02/21/2013 22:30:00 “,” text “:” Visit “,” details “:” Scheduling Previous: 18 \ / 02 \ / 2013 22:00 00 - test “,” id_cliente “,” 725 “}, {” id “,” 29 “,” start_date “,” 02/18/2013 22:00:00 “,” end_date “:” 2013-02 - 18 22:30:00 “,” text “:” Visit “,” details “:” Scheduling Previous: 25 \ / 02 \ / 2013 10:00:00 “,” id_cliente “:” 725 “}, {” id “:” 28 “,” start_date “:” 18/02/2013 20:00:00 “,” end_date “:” 02/18/2013 20:30:00 “,” text “:” Visit “,” details “” Scheduling Previous: 04 \ / 02 \ / 2013 14:20:00 - “,” id_cliente “:” 752 “}, {” id “:” 25 “,” start_date “:” 14 04/02/2013 : 20:00 “,” end_date “:” 02/04/2013 14:50:00 “,” text “:” Visit “,” details “: null,” id_cliente “:” 752 “}, {” id " : “24”, “start_date”: “02/25/2013 10:00:00”, “end_date”: “02/25/2013 10:30:00”, “text”: “Visit”, “details” “Scheduling Previous: 01 \ / 02 \ / 2013 16:00:00”, “id_cliente”: “725”}, {“id”: “23”, “start_date”: "01/02/2013 16:00 : 00 “,” end_date “:” 01/02/2013 16:30:00 “,” text “:” Visit “,” details “: null,” id_cliente “:” 725 “}, {” id “:” 182 “,” start_date “:” 03/28/2013 08:00:00 “,” end_date “:” 28/03/2013 08:30:00 “,” text “:” Visit “,” details “:” - ok “,” id_cliente “:” 1473 “}, {” id “:” 181 “,” start_date “:” 03/28/2013 07:00:00 “,” end_date “:” 07 03/28/2013 : 30:00 “,” text “:” Visit “,” details “:” - ok “,” id_cliente “:” 1476 "}]


According to the log - you are using incorrect path, and data saving feed just not located.
Currently you are setting paths differently

$$("scheduler").load(arquivoxml,"scheduler"); $$("scheduler").config.save = "../agenda/data";

Why not use the same url for both ?

$$("scheduler").load(arquivoxml,"scheduler"); $$("scheduler").config.save = arquivoxml;

I used to load the xml data.
But with JSONDataConector created a method to record the data.
Is this possible?
Because the xml I bring the data formatted the way I need.
And use the JSONDataConector in php / CodeIgniter to write the data.
But I could not make it work.

I think the scheduler’s connector will be able to save data from client side.
Anyway, if you wish to use two connectors - you can have them as separate files, it is not a problem, but in above case path to second connector is wrong ( it generates error 404, which is visible on screenshoot )

How do I do then to write the data that comes from the client side?

Now the two moved to call the same method.

See the pictures.

O method Data() the method data () correctly brought with JSONDataConector.

But when it is salved/ edited it continues with the same error 404 (not found)




Are you using some server side framework for url routing?
It seems that “?editing=true” breaks the routing
Also, it possible that you have this route enabled for GET request, but disabled for POST ( data saving done through POST requests )

I’m not using any server side framework for add url routing.

Calling the method in the url it brings the data correctly.
He adds this parameter “? Editing = true.”
What is this parameter?
This is happening with both components of the Scheduler and Scheduler Mobile.


He adds this parameter “?editing=true.”

Parameter is added by connector and necessary to trigger data updating on server side.

Now, It’s works.

var dp = new dataProcessor(caminhosave);
dp.setTransactionMode(“POST”);
dp.action_param =“dhx_editor_status”;

            dp.attachEvent("onAfterUpdate", function(sid, action, tid, response){
	    if (action == "invalid"){
		alert(response.getAttribute("details"));
	    }
                if (action == "inserted"){
		alert(response.getAttribute("details"));
	    }
        })
            
          
            dp.init(scheduler);