updating, deleting one event in recurring serie

Hi,

I am not using your connectors as working in coldfusion.

I have looked to the specifics regarding the recurrent events and we have implemented it successfully for the ajax that manipulate the data in the database.

Our problem is whenever we modify or delete an event in a serie,
1/ it does not disappear on the agenda,
2/ the new created event is not modifiable , we get the error : this._rec_markers[A] is undefined, when trying to modify (the event opens the lightbox, but save throw the mentionned error and the light box stays opened)

This is the script that we are using (eventID_current is the id sent back from the database) :

scheduler.attachEvent(“onEventAdded”,function(id,ev){
doSAVE(id, ev);

					// set the EVENTID with the one coming from the database
					scheduler.changeEventId(id, eventID_current);
					
					// force to be displaied on each view
					scheduler.updateEvent(eventID_current);

					return true;
				});
				
				// When modifying an Event
				scheduler.attachEvent("onEventChanged",function(id,ev){
					doSAVE(id, ev);
						
						
					return true;
				});
				
				// When deleting an Event
				scheduler.attachEvent("onBeforeEventDelete",function(id,ev){
					doDELETE(id, ev);

					return true;
				});

The doSave and doDelete are only Ajax functions that update the database according the existence of a event_pid and according rec_type (with the none conditions…) [but as mentionned above, we have no pb with the database side, it is just the javascript that should clean the agenda]

Please tell me what should be the extra scheduler functions that should be add to our script to manipulate the agenda properly.

Regards,

Eric

I am not using your connectors as working in coldfusion.
Actually there is a CF version as well.
support.dhtmlx.com/x-files/sampl … tor_cf.zip

1/ it does not disappear on the agenda,
Check docs.dhtmlx.com/doku.php?id=dhtm … ntegration

which means that during event-in-serie deleting, “add” action will be executed ( with rec_type = none ) and your code must delete that event on client side after server side processing. ( dataprocessor do it automatically, in your case extra client side code need to be added )

the new created event is not modifiable
By default code changes ID of event , after it has been added to a database.

  • event created with temp id
  • event saved in DB, new id returned to the client side
  • temp id replaced with new id
    If you not using dataprocessor you need to call changeEventId after receiving info from server side.

Thanks for the reply, but I have spend hours on your page explaining the principles for implementation. I fully understand what you say and conceptually this is what I have done.

However the result is not there.

This is why I mentionned that we are calling 3 events :

  • onEventAdded
    where we perform the insert in the database, get the new ID, change the id in the agenda (scheduler.changeEventId(id, eventID_current):wink: and do an scheduler.updateEvent

  • onEventChanged
    where we only modify the data in the database. No javascript action on the calendar.

  • onBeforeEventDelete
    where we only modify the data in the database. No javascript action on the calendar.

I do not find the good use of events to perfectly deal with the delete and update of an event in a serie. So which javascript actions should I use and connected to which events in order to perform what the connector is doing.

Regards,

Eric

Fine for normal events, wrong for recurring ones.
When you deleting instance-from-seria, scheduler generate “onEventAdded” event , not deleting ( because in fact we need to add deletion mark in DB, not remove the existing one ) , and after calling server side, you need to exec

if (ev.rec_type == "none") scheduler.delete(ev.id);

Hi,

Your proposed solution is not working for me. And if I apply it for pid#event_length, it even creates a loop that I can stop only by forcing IE to close.

So, I have tried the coldfusion connector. The bugs in the coldfusion dhtmlx connector are:

  • Delete of an event is not deleting in the database when the event has just been added (it means when no update of the calendar by refreshing the page), but the client side is properly removing the event.

  • Update of an event is inserting the event twice in the database when the event has just been added (it means when no update of the calendar by refreshing the page), but the client side is properly refreshing the event.

  • Update of an event : the custom form (a drop down) is not properly displaied (instead it always take the last value that was saved in a form).

  • Update a full serie of recurring events : the update in the db is not performed, but the client side is properly updating the event

  • Delete a full serie of recurring events : the delete in the db is not performed, but the client side is properly deleting the event

Besides are the doc document available (as for the PHP version)?

And if not, how can we do complex updates.

Regards,

Eric

And if not, how can we do complex updates.
Connector is still in development ( it wasn’t released officially ) , so there is no any public documentation for it, except of samples, which are included in the package.

And if not, how can we do complex updates.
Same as in PHP version , you can attach custom code to the server side events ( all connector shares the same approach, just use platform related syntax )

You can check
cf\samples\scheduler\recurring_events\events_rec.cfm

<cfset scheduler.event.attach("beforeProcessing",delete_related)> <cffunction name="delete_related"> ...

This assigns custom code, which will be processed before any DB action, you can call custom functionality from it.

I have forwarded the CF questions to the related team. Meanwhile , are you using the sample included in the package cf\samples\scheduler\recurring_events\events_rec.cfm , or some custom code based on it ?

I am using the code as in your sample.

In
cf\samples\scheduler\recurring_events\sample_recurring.html

uncomment

var dp = new dataProcessor("events_rec.cfm"); dp.init(scheduler);

If some problems still occur - try to add the next line to the server side code

It will enable DB operation log

Hi,

No change with your suggested removal.

Besides doing :
<cfset scheduler.sql.attach(“Update”,“UPDATE TBL_EVENTS_REC set text=’{text}’, sy_uuid=‘MONMON’ where event_id={event_id}”)>
do not change the UPDATE query.

I would like to wait that you have an operationnal coldfusion connector as I really can’t figure how to make the agenda refresh for the deleting an event in a serie of recurrent events (do you know when is the next release?).

I have tried to add :
if (id.toString().indexOf("##")!=-1) {
var id = id.split("##");
var nid = scheduler.uid();
scheduler._not_render=true;
scheduler.addEvent({
id:nid,
start_date:ev.start_date,
end_date:ev.end_date,
text:ev.text,
event_pid:id[0],
event_length:id[1],
rec_type:‘none’
});
scheduler._not_render=false;
scheduler._rec_markers[id[1]*1000]=scheduler.getEvent(nid);

					}

to force for the event that I want to delete in a serie to disappear on the agenda, but the all the events are disappearing and the javascript error is : C is undefined

Regards,

Eric

do you know when is the next release
First part of March 2009

Has there been any resolution to this as I am experincing something similar with my set up.

The event in the recurring series is not dissapearing although I can see the new event being added if I change some of the redering properties and I get the error this._rec_markers[…].event_pid is null or not an object.

The event is successfully sent to the DB and reders properly when the items are read from the DB.

Is this a different bug or something similar.

Thanks

Try to update your codebase to version 2.2
If issue still occurs - are you using custom server side code or connectors? To work with recurring events, connectors need some extra code on server side ( included in related samples ), without it functionality of recurring-exceptions can be a bit quirky.