Reload

How to reload the Scheduler object after changes, deletions or inserts?

scheduler.clearAll(); scheduler.load("some.php"); //url for data loading

It did not work does not update.
It takes some event after the updates to recharge?

It reload data from server so some delay ( time to load new data ) is expected, but it must be quite fast.

If issue still occurs - can you provide any kind of sample or demo link where it can be checked.

I have a function to load. This function has a schedulerConnector.
It loads correctly as I need.

I could not get treatment for insert / update using the same function. Then I created another function that receives POSTs and records in the database.

Only that this function which records (datasave) she does not have a connector.

I think so no reloads, only when I press the F5 key to give it reloads.

How would understand him to recharge if the function does not have to reload an object of connector?

Attached is the source of the functions in php.

Thanks for help…

function init() {

        scheduler.init('scheduler_here',new Date(),"week");
        scheduler.clearAll();
        scheduler.load(caminho); //carrega o objeto do controller


        //Dataprocessor
        var dp = new dataProcessor(caminhosave);
        dp.setTransactionMode("POST");
        dp.action_param ="dhx_editor_status";
        dp.init(scheduler);    

}
data_php.txt.zip (3.01 KB)

As far as I can see you are using custom code for data saving ( which is fine ) but events still stay as not saved on client side, right ?

While you are not using connector, your server side still need to output the message to the dataprocessor which confirms data saving.

instead of echo (“deletado”); it will be

header("Content-type:text/xml"); echo "<data><action type="delete" sid="$id" tid="$id"></data>";

where $id - id of record which will be deleted
for update - type=“update”
for insert - type=“insert”, and tid must contain new id of record ( which is generated by database )

Thanks Stanislav, but still didn’t work.

He returned the xml you gave me. But nothing did and reloaded only with F5.

Is there any parameter or event that should be configured in dataprocessor?

I do not know what else to do.

I guess I’ll start all over again in another way.

Thanks for your help as always.


According to response data was correctly saved in DB.
Just to be sure that I’m correctly understanding the problem, which kind of “update” you are expecting on client side ?

Response has few extra lines before first tag, which is not critical for Chrome|Safari, but can cause problem in FireFox, where there must not be any output before first xml tag.

Data are recorded correctly in the database.
I could not remove those blank lines in my controller.

header(“Content-type:text/xml”);
echo ‘’;

I created a new dataprocessor, it worked but it still does not do is recharge the screens with new data.

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

        var dp1 = new dataProcessor(caminho);
        dp1.init(scheduler);    

I still can not solve my problem.




You can watch movies with. files .ogv?

Hi,

Data are recorded correctly in the database.
I could not remove those blank lines in my controller.

Please check php files that are included into controller. The often reason of such issue are newlines after closing tag in php file.
For example, following file will add two empty lines before the output(see two lines after ‘?>’ )
config.php:

[code]<?php
$host = “localhost”;
$user = “user”;
$pwd = “pwd”;
$db = “db”;
?>

[/code]
the easiest way to make sure it’s not happening is to remove closing php tags(’?>’) where it’s possible