I cannot get the iNotesCalendar control to work.
It works in a tearoom.nsf. But if I put the controls in normal mail.nsf I always get a blank calendar.
I can get JSON via a web browser. Looks like this:
My code is this:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:restService
id="restService1"
pathInfo="/inoteslegacyjson"
preventDojoStore="false">
<xe:this.service>
<xe:calendarJsonLegacyService
viewName="calendarOutline"
var="entry"
contentType="text/plain"
colCalendarDate="CalDateTime"
colStartTime="StartDateTime"
colEndTime="EndDateTime"
colSubject="For"
colChair="Chair">
</xe:calendarJsonLegacyService>
</xe:this.service>
</xe:restService>
<xp:br></xp:br>
<xe:calendarView
id="calendarView1"
jsId="cview1"
type="#{javascript:sessionScope.dateRangeActions_selectedValue}"
storeComponentId="restService1"
style="width:100%">
<xe:this.summarize>
<![CDATA[#{javascript:summarize = sessionScope.calendarFormatActions_selectedValue == "true";}]]>
</xe:this.summarize>
</xe:calendarView>
</xp:view>
You'd like to present the calendar view as iNotesCalendar for a normal mail database which is based on mail.ntf.
Your question's example is designed for and works with the teamroom.nsf. It uses a specialized view "calendarOutline". All calendarJsonLegacyService's properties which start with "col" define the specific column names of this view. So, you can't really use this example to read a "normal" calendar view of a mail database.
Luckily, all
calendarJsonLegacyService
properties' default values are dedicated to the "normal" calendar view "($Calendar) | Calendar" of mail boxes.Change your code this way:
viewName
property to "Calendar"databaseName
with value "yourServerName!!pathToMailDatabase.nsf"Your restService would look like this then: