Mar 04, 2011, 3:09 AM
[CLOSED] EventStore and REST API
I was trying to use the event store using the REST API, but it's not working. For some reason, the store is only sending Creates and not Updates. I was wondering if you knew why or what I have to do in order to get it to post an update.
Have you guys overrided this in your EventStore implementation?
Also, why can't i add a writer?
Have you guys overrided this in your EventStore implementation?
Also, why can't i add a writer?
<EventStore ID="storeCalendarEvents" runat="server" DateFormat="yyyy-MM-ddThh:mm:ss" Restful="true">
<Proxy>
<ext:HttpProxy>
<RestAPI
CreateUrl = "/Event/Create"
UpdateUrl = "/Event/Update"
DestroyUrl = "/Event/Delete"
ReadUrl = "/Event/GetEventsByDate" />
</ext:HttpProxy>
</Proxy>
<Reader>
<ext:JsonReader Root="data">
<Fields>
<ext:RecordField Name="EventId" />
<ext:RecordField Name="CalendarId" />
<ext:RecordField Name="Title" />
<ext:RecordField Name="StartDate" Type="Date" />
<ext:RecordField Name="EndDate" Type="Date" />
<ext:RecordField Name="IsAllDay" />
<ext:RecordField Name="Location" />
<ext:RecordField Name="Notes" />
<ext:RecordField Name="Url" />
<ext:RecordField Name="Reminder" />
<ext:RecordField Name="IsNew" />
<ext:RecordField Name="InviteCode" />
<ext:RecordField Name="UserResponse" />
<ext:RecordField Name="ClassName" />
</Fields>
</ext:JsonReader>
</Reader>
</EventStore>
Here's the save logicsave: function (rec) {
frmPlnCalendarEditEvent.getForm().updateRecord(rec);
if(MyCalendar.record.isNew) {
MyCalendar.getStore().add(rec);
}
MyCalendar.changeCustomView("calendar");
MyCalendar.getStore().save(); // should trigger events -- currently only triggers the create
}
Last edited by Daniil; Mar 04, 2011 at 3:32 PM.
Reason: [CLOSED]