I am looking to implement the jQuery full calendar control as Keith Strickland was nice enough to demonstrate here. http://www.keithstric.com/A55BAC/keithstric.nsf/default.xsp?documentId=C4ACC1CA300C873786257B15007F7732
I am having problems with his method of using java to get the data. Could someone be willing to help me use another method to parse the data in a notes view or at least understand what is going on? I would prefer to use native REST control, or javascript if possible. Here is an example of my failed attempts to read the
I have a notes form and for simplicity sake I name the fields start, end, and title. My view has those fields which are the same fields that the full calendar is looking for. I thought I could just feed the full calendar the json data and it would be happy. Is this possible?
<xp:scriptBlock>
<xp:this.value><![CDATA[var calCon = $("[id$=calendarContainer1]");
var urlVal = function() {
var baseUrl = location.href;
var restUrl = baseUrl.substring(0, baseUrl.indexOf(".xsp") +4);
restUrl = restUrl + "xRest";
return restUrl;
}
calCon.fullCalendar({
firstDay: 0,
header: {
left: "prev,next today",
center: "title",
right: "month,basicWeek,basicDay"
},
disableDragging: true,
events: {
url: urlVal(),
type: "GET",
error: function() {
alert("something asploded");
}
},
dayClick: function(date, allDay, jsEvent, view) {
console.log("date=",date);
console.log("allDay=",allDay);
console.log("jsEvent=",jsEvent);
console.log("view=",view);
}
});]]></xp:this.value>
</xp:scriptBlock>
Here is my jSOn
{
"@entryid":"2-99049B468C567FC3852577D20021A431",
"@unid":"99049B468C567FC3852577D20021A431",
"@noteid":"9AA",
"@position":"2",
"@siblings":539,
"@form":"cp",
"start":"2010-11-22T00:40:40Z",
"end":"2010-11-22T00:40:40Z",
"title":"Duncan, SC Office",
"name":"username",
"allday":"",
"$4":"99049B468C567FC3852577D20021A431"