Skip to main content link. Accesskey S
  • Help
  • IBM Logo
  • IBM Notes and Domino Application Development wiki
  • All Wikis
  • All Forums
  • THIS WIKI IS READ-ONLY. Learn more...
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
  • API Documentation
Search
Community Articles > 日本語 - Japanese > iNotes Calendar コントロールを使用した XPages 開発
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

Click to view profileIBM contributorHiroaki Komine
Contribution Summary:
  • Articles authored: 43
  • Articles edited: 7
  • Comments Posted: 1

Recent articles by this author

JMeter で XPages アプリケーションをテストする、入門編

JMeter を初めて使う方にむけて、Domino アプリケーションや XPages アプリケーションを JMeter でテストをするための手順を最初のステップから解説します。

Eclipse Memory Analyser Tool を使用した、XPages のメモリリークの調査

Java アプリケーションのメモリリークを調査する強力なツールである Eclipse Memory Analyser Tool を使用して、XPages アプリケーションのメモリリークを調査する方法について紹介します。

XSP クライアントサイド Javascript オブジェクト関数

XPages アプリケーション開発の中で利用できる、XSP クライアントサイド Javascript オブジェクト関数について解説します。

Lotus Notes Java クラスのリサイクルとメモリ消費の検証

XPages や Java エージェントなどで Lotus Notes を操作する Lotus Notes Java クラスでは、開発者が明示的にリサイクルをして使用したオブジェクトを開放する必要があります。このリサイクルを適切に行わないことで、Java クラスの

XPages アプリケーションでの「可視(rendered)」プロパティによるパフォーマンス低下への対策

XPages アプリケーション開発で、「可視」設定ので「値の計算」はパフォーマンス低下を招く可能性があります。「可視」評価の Javascript に複雑な処理を実装する必要があるときには、そのスクリプトでパフォーマンスの低
Community articleiNotes Calendar コントロールを使用した XPages 開発
Added by IBM contributorHiroaki Komine | Edited by IBM contributorHiroaki Komine on March 13, 2012 | Version 9
  • Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
Notes/Domino 8.5.3 Upgrade Pack 1 で提供されている iNotes Calendar コントロールの使用方法を記述します。 This article show how to use iNotes Calendar control on XPages, which is provided by Notes/Domino 8.5.3 Upgrade Pack 1.
ShowTable of Contents
HideTable of Contents
  • 1 アプリケーションプロパティの設定 (Application Properties)
  • 2 フォームの作成 (Creating a form)
  • 3 ビューの作成 (Creating a view)
  • 4 XPage の作成 (Creating a XPage)
  • 5 イベント処理 (Event handling)
  • 6 スケジュールエントリの表示 (Open a schedule document)

アプリケーションプロパティの設定 (Application Properties)

アプリケーションのプロパティで「詳細」タブを開き、「XPages ライブラリ」セクションのライブラリ ID で「com.ibm.xsp.extlibrary」をチェックして保存する。
You have to select "com.ibm.xsp.extlibrary"in "Detail" tab of Application properties.

 

フォームの作成 (Creating a form)

フォーム を作成し、以下のフィールドを配置する。

フォーム名 (Form name): Event
 

フィールド名
(Field Name)
フィールドの種類
(Field type)
その他の設定
(Other options)
EventDate 日付/時刻 (Date/Time) スタイル: 日付/時刻制御
表示: 日付のみ
(Date/Time style shows date only)
StartDateTime 日付/時刻 (Date/Time) スタイル: 日付/時刻制御
表示: 時刻のみ
(Date/Time style shows time only)
EndDateTime 日付/時刻 (Date/Time) スタイル: 日付/時刻制御
表示: 時刻のみ
(Date/Time style shows time only)
Subject テキスト (Text)  
From テキスト/計算結果
(Text/Computed)
値: @UserName
Icon 数値
(Number)
 

 

ビューの作成 (Creating a view)

ビューを作成し、以下のカラムを配置する。

ビュー名 (View name): calendarOutline
 

列のタイトル
(「列の情報」タブ)
(Column title)
列の名前
(「詳細」タブ)
(Column name)
ソート
(「ソート」タブ)
(Sort)
スタイル
(「拡張フォーマット」タブ)
(Style)
表示
(「拡張フォーマット」タブ)
(Display)
列の値
(Value)
CalDateTime CalDateTime 昇順
(ascending)
日付/時間 (Date/Time) 日付のみ (Date only) DT := @Text(@Date(EventDate)) + " " + @Text(@Time(StartDateTime));
@TextToTime(DT)
StartDateTime StartDateTime なし 日付/時間 (Date/Time) 時刻のみ (Time only) DT := @Text(@Date(EventDate)) + " " + @Text(@Time(StartDateTime));
@TextToTime(DT)
EndDateTime EndDateTime なし 日付/時間 (Date/Time) 時刻のみ (Time only) DT := @Text(@Date(EventDate)) + " " + @Text(@Time(EndDateTime));
@TextToTime(DT)
Icon Icon なし 一般 (General)   Icon
For For なし 一般 (General)   Subject
Chair Chair なし 一般 (General)   @Name([CN];From)

ここで列のプロパティインフォボックスの「詳細」タブの列の名前を設定することを忘れずに行う。
Column name must be specified at "Detail"tab of column property infobox

 

XPage の作成 (Creating a XPage)

XPage を作成し、以下のソースを記述する。

XPage 名 (XPage name): mycalendar

	<?xml version="1.0" encoding="UTF-8"?>
	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"
	    xmlns:xe="http://www.ibm.com/xsp/coreex">
	    <xe:restService id="restService2" pathInfo="/inoteslegacyjson"
	        preventDojoStore="false">
	        <xe:this.service>
	            <xe:calendarJsonLegacyService viewName="calendarOutline"
	                var="entry" contentType="text/plain" colCalendarDate="CalDateTime"
	                colEntryIcon="Icon" colStartTime="StartDateTime" colEndTime="EndDateTime"
	                colSubject="For" colChair="Chair">
	            </xe:calendarJsonLegacyService>
	        </xe:this.service>
	    </xe:restService>
	    <xe:calendarView id="calendarView1" jsId="cview1"
	        storeComponentId="restService2" style="width:100%" type="M">
	    </xe:calendarView>
	</xp:view>

	

 

 

イベント処理 (Event handling)

Calendar コントロールで、エントリをクリックしたときのイベント処理を追加します。
<xe:calendarView> タグ内に以下のように記述して、onOpenEntry イベントでのクライアントサイド JavaScript を記述することができます。この例ではダイアログを表示します。

Some event handling can be added to Calendar control.
You can add Client-side JavaScript for "onOpenEntry" event handling as the following XPage source. This code will show a dialog on the event.

 

	 
	<xe:calendarView id="calendarView1" jsId="cview1"
	    storeComponentId="restService2" style="width:100%" type="M">
	    <xe:this.onOpenEntry>
	        <![CDATA[alert("Hello Calendar Control !");]]>            
	    </xe:this.onOpenEntry>
	</xe:calendarView>

	

 

スケジュールエントリの表示 (Open a schedule document)

Calendar コントロールで選択されたスケジュール文書を表示するためには、先のクライアントサイド JavaScript イベントで文書を開く処理を記述しています。

To open a schedule document by clicking the Calendar control, you can add JavaScript code to do do. 

 

	var path = "";
	var sUnid = items[0].unid;
	if(dojo.isMozilla || dojo.isWebKit){
	    path = #{javascript:"\"" + @FullUrl('/') + "\""};
	    path = path + "myevent.xsp?documentId=" + sUnid + "&action=openDocument";
	}else{
	    path = "myevent.xsp?documentId=" + sUnid + "&action=openDocument";
	}
	document.location.href = path;

	

 

なおここでは、スケジュール文書を開くための 「myevent」 XPage があらかじめ作成されていることとします。
この JavaScript を含む 「mycalendar」 XPage のソースの全体は以下になります。

In this implementation, we assume "myevent" XPage was already created to show the schedule document.
The whole XPage source including the JavaScript code is as the following:

 

	<?xml version="1.0" encoding="UTF-8"?>
	<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom"
	    xmlns:xe="http://www.ibm.com/xsp/coreex">
	    <xe:restService id="restService2" pathInfo="/inoteslegacyjson"
	        preventDojoStore="false">
	        <xe:this.service>
	            <xe:calendarJsonLegacyService viewName="calendarOutline"
	                var="entry" contentType="text/plain" colCalendarDate="CalDateTime"
	                colEntryIcon="Icon" colStartTime="StartDateTime" colEndTime="EndDateTime"
	                colSubject="For" colChair="Chair">
	            </xe:calendarJsonLegacyService>
	        </xe:this.service>
	    </xe:restService>
	    <xe:calendarView id="calendarView1" jsId="cview1"
	        storeComponentId="restService2" style="width:100%" type="M">
	        <xe:this.onOpenEntry>
	            <![CDATA[
	var path = "";
	var sUnid = items[0].unid;
	if(dojo.isMozilla || dojo.isWebKit){
	    path = #{javascript:"\"" + @FullUrl('/') + "\""};
	    path = path + "myevent.xsp?documentId=" + sUnid + "&action=openDocument";
	}else{
	    path = "myevent.xsp?documentId=" + sUnid + "&action=openDocument";
	}
	document.location.href = path;
	]]>            
	        </xe:this.onOpenEntry>
	    </xe:calendarView>
	</xp:view>

	


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (9)
collapsed Versions (9)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (9)Mar 13, 2012, 9:10:22 AMHiroaki Komine  IBM contributor
8Mar 13, 2012, 9:09:32 AMHiroaki Komine  IBM contributor
7Mar 13, 2012, 4:00:16 AMHiroaki Komine  IBM contributor
6Mar 13, 2012, 3:53:20 AMHiroaki Komine  IBM contributor
5Mar 12, 2012, 11:15:22 PMHiroaki Komine  IBM contributor
4Feb 16, 2012, 9:07:12 AMHiroaki Komine  IBM contributor
3Feb 16, 2012, 9:06:10 AMHiroaki Komine  IBM contributor
2Feb 16, 2012, 8:23:32 AMHiroaki Komine  IBM contributor
1Feb 16, 2012, 8:05:53 AMHiroaki Komine  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkThe Social Lounge
  • Wiki Help
  • Forgot user name/password
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use