а

Lifecyle in scheduler


#1

HI, what is the lifecycle of scheduler


#2

Hi,

Could you please elaborate what you mean by “lifecycle of scheduler”?


#3

I was told that the scheduler has a lifecycle, a succession of step it goes through from loading the data. I haven’t found much detail from the documentation, how it really work behind the scene from the loading of the data to the render inside the view.


#4

If we talk about what happens when you call scheduler.load, the sequence is the following:
https://docs.dhtmlx.com/scheduler/api__scheduler_load.html

  1. scheduler send ajax request to the specified url
  2. onLoadStart event invoked https://docs.dhtmlx.com/scheduler/api__scheduler_onloadstart_event.html
  3. once the request is completed, scheduler.parse is called to process the result https://docs.dhtmlx.com/gantt/api__gantt_parse.html
  4. onBeforeParse is invoked
  5. if dataset contains any collections - they get parsed and onOptionsLoad is called https://docs.dhtmlx.com/scheduler/api__scheduler_onoptionsload_event.html
    5.1 if Units, or Timelien view is active when onOptionsLoad is called - they can call a repaint https://docs.dhtmlx.com/scheduler/api__scheduler_setcurrentview.html
  6. onEventLoading is called for every processed event https://docs.dhtmlx.com/scheduler/api__scheduler_oneventloading_event.html
  7. loaded events are rendered in the scheduler
  8. onParse is invoked
  9. onLoadEnd is invoked

Is that what you mean, or did you want to know something different?