Have problem on using recurring-scheduler

Hi Team,

I try to use recurring-scheduler function in dhtmlxScheduler, but I don’t have idea on how to deal with below two add events:

  1. I define it and it works well if I don’t use recurring-scheduler function:
    this.addEvent(new Date(this._drag_start), new Date(end),this.locale.labels.new_event,this._drag_id,{resources:this.locale.labels.new_resources,organizer:this.locale.labels.new_organizer,timeoffset:(new Date()).getTimezoneOffset()});

  2. It defines in dhtmlxScheduler_recurring.js:
    this.addEvent({
    id:nid,
    start_date:ev.start_date,
    end_date:ev.end_date,
    event_pid:ev.event_pid,
    event_length:id[1],
    rec_type:“none”,
    rec_pattern:“none”
    });

So my question is how to integrate this two “addEvent”?

And also I have a question about the DB table “events_rec”, what’s the mean of columns “event_pid” and “event_length”?

Best wishes,

Judo520

Technically you need not mind about difference of addEvent method if you adding normal events - just add them in the same way as without recurring.

If you adding recurring event you need to provide 4 extra parameters, which will define recurring scheme

rec_type
rec_pattern - same as rec_type
event_length
event_pid

Details of fields can be checked at
docs.dhtmlx.com/doku.php?id=dhtm … ntegration

Hi Stanislav,

I could load recurring-scheduler events now, but if I created a new event I always geting below error in my server side:
java.lang.NullPointerException
at com.spirent.scheduler.MySQLDBDataWrapper.escape(MySQLDBDataWrapper.java:17)
at com.spirent.scheduler.DBDataWrapper.insert_query(DBDataWrapper.java:151)
at com.spirent.scheduler.DBDataWrapper.insert(DBDataWrapper.java:199)
at com.spirent.scheduler.DataProcessor.check_exts(DataProcessor.java:251)
at com.spirent.scheduler.DataProcessor.inner_process(DataProcessor.java:199)
at com.spirent.scheduler.DataProcessor.process(DataProcessor.java:118)
at com.spirent.scheduler.BaseConnector.render(BaseConnector.java:292)
at com.spirent.scheduler.BaseConnector.render_table(BaseConnector.java:210)
at com.spirent.javaconnector.SchedulerRecConnector.configure(SchedulerRecConnector.java:28)

Add I traced the code in server side, seems some columns (Such as “event_pid”) had “null” value caused this error.

So did you how to initial some column values once I wanted to add a new event?

Best wishes,

Jundong

Hi Stanislav,

I used below codes to add recurring events successfully, but I still wasn’t very clearly on how to initial “rec_type”, “event_pid” and “event_length”.

scheduler.addEvent(start, start,scheduler.locale.labels.new_event,evID,{rec_type:"",event_pid:“0”,event_length:“3600”,resources:scheduler.locale.labels.new_resources,organizer:scheduler.locale.labels.new_organizer,timeoffset:(new Date()).getTimezoneOffset()});

In recuring-scheduler sample DB table, rec_type had 3 values: “”(empty), “none” and basic value.

But the doc didn’t include enough infor to explain what’s mean for these 2 values, so if possible, would you like to give me some coment on this? Thanks,

Best wishes,

Judo520

{empty} value of rec_type means that event has not recurring rules ( single time event )

“none” value of rec_type means that this is deleted event from recurring serie ( it can be created when you have recurring event and delete one of its instances, for specific date )

About Java issue - we will fix it in the next version of connectors.