Reputation: 3137
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>
Upvotes: 1
Views: 466
Reputation: 30970
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:
<xe:restService
id="restService1"
pathInfo="/inoteslegacyjson"
preventDojoStore="false">
<xe:this.service>
<xe:calendarJsonLegacyService
viewName="Calendar"
contentType="text/plain"
databaseName="Server1!!mail.nsf">
</xe:calendarJsonLegacyService>
</xe:this.service>
</xe:restService>
Upvotes: 2
Reputation: 21709
Your code for xe:restService and xe:calendarView looks similar to what I use.
I have experienced issues with using xe:calendarView with Internet Explorer 11. The problem is that the calendar is empty - exactly as what you experience. In order for it to work with IE11 I force IE11 to act as IE10 by setting the X-UA-Compatible to "IE=10".
Upvotes: 0