どのフォルダにドキュメントが格納されているかを知る @WhichFolders

自分の使っているLotus Notes 8.5.1のメールで「All Documents」にフォルダ情報が表示されているのが不思議で、Designerで($All) view を開いてみたら「Folder」columnに@WhichFolders ってのが記載されていました。

@WhichFoldersなんて便利なコマンドあったっけ?と思ってググってみました。

Knowing which folder a document is in - @WhichFolders

Steve Castledine 8 September 2008 09:28:53

Sometimes people don't see the release notes (I'm not saying this is definitely in them), or new formula etc can be forgotten, but a nice new formula in 8.5 was @WhichFolders which can be used to determine, surprisingly, which folder the current document is in.

To see it in action, it was added to the mail template, all documents view.

Funny, I'm not even sure this made it into the designer help db, I will have to check.

引用元: Knowing which folder a document is in - @WhichFolders.

Lotus Notes 8.5から出来たFormula だったんですね。
しかもドキュメントにはなっていないみたい。 隠しコマンド?

ちなみに、@WhichFolders を調べているときに発見した別のブログ「Interesting undocumented formulas」( http://lotus-blogs.blogspot.com/2009/01/interesting-and-undocumented-formulas.html )

にもいろいろと紹介されています。

さて、こんな便利なコマンドが@Formulaには用意されたみたいなんですが、自分への命題は「Lotus Notes C API」を使って同等の機能を実装できるか?

これが、簡単なようで上手くいかない。 IMAPコマンドをメールDBに対して掛けてやると$FolderRefが埋め込まれるのでこれによってフォルダ階層を割り出すことが可能になるのだが、もうちょっとスマートな方法を模索中・・・

と、またまた、ためにならない投げっぱなしな投稿でおわり。


xPagesのTabbed PanelをPartial RefreshでAjax化させよう

xPagesのTabbed Panelってとても便利だと思うのですが、デフォルトだと、クリック毎にページ全体を読み直すのでかっこ悪い。
そこで、Partial Refreshを使ってAjax化させてみました。

<xp:panel id="container">
<xp:tabbedPanel id="tabbedPanel1">
<xp:this.selectedTab>
<![CDATA[#{javascript:(null == sessionScope.selectedTabId) ? "tabPanel1" : sessionScope.selectedTabId}]]>
</xp:this.selectedTab>
<xp:tabPanel label="Tab1" id="tabPanel1">
Tab1のコンテンツが入ります。
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="container">
<xp:this.action>
<![CDATA[#{javascript:sessionScope.selectedTabId = "tabPanel1"}]]></xp:this.action>
</xp:eventHandler>
</xp:tabPanel>
<xp:tabPanel label="Other" id="tabPanel2">
Tab2のコンテンツが入ります。
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="container">
<xp:this.action>
<![CDATA[#{javascript:sessionScope.selectedTabId = "tabPanel2"}]]>
</xp:this.action>
</xp:eventHandler>
</xp:tabPanel>
</xp:tabbedPanel>
</xp:panel>

ここでは、

1)各Tabの中にonclickイベントを作成。
2)Partial UpdateのElementに親タグのID"container"をRefreshIDに指定。
3)onclickイベントの中で、各タブごとに、selectedTabIdを以下のように指定する。
sessionScope.selectedTabId = "tabPanel1"

しかし、これをデザインのプロパティからやろうとすると、操作が難しい(というか出来ない)ので、ソースをガシガシ書いていくのが吉です。

ちなみに、自分の環境では8.5.0までは "_10f.push is not a function"のエラーが出て上手く動いていなかったので、XPages Blogにある通り8.5.1にアップデートしたら問題は解消されました。

Partial refresh and Firefox 3.5, Safari, Opera on 8.5.0 - XPages Blog - The XPages Blog

I just stumbled upon this post in the 8.5 forum: it describes the known problem that partial refreshes on a Domino 8.5.0 server causes the message "_10f.push is not a function".

This happens with Firefox 3.5, Safari 4, Opera and I believe in IE 8, too.There is no workaround at least none I'm aware of but using full refreshes all the time.But: the solution is underway! This is fixed in the upcoming 8.5.1.

引用元: Partial refresh and Firefox 3.5, Safari, Opera on 8.5.0 - XPages Blog - The XPages Blog.


Notes 8.5.1クライアントで動くxPagesコンポーネント

Here are two videos that demonstrate how you can used XPages components in the Lotus Notes 8.5.1 client.

引用元: Lotus Domino Designer wiki.

デモの通りだと、とても簡単に実装できそうです♪
Lotus Notes 8.5.1の正式リリースが10月12日らしいので、いまから待ち遠しい。

ちなみに、Lotusphere 2009でBob Balfのセッションで言っていたWebフォームとComposite Applicationのワイヤリングが簡単に出来る機能。セッションでの彼の発言によると8.5.1で実装されるはずなんだけど、あまり聞かないなぁ~。 実装見送りになったのかな?

ワイヤリングする対象をHTMLのDOMをインタラクティブに調べることで簡単に行ってた。 まるでFirebugのElementsを調べる機能みたいでみててかなり感動だったんだけどな・・・


iWidgetsをLotus Dominoで使える?!

Enabling iWidgets in IBM Lotus Domino Web applications

Lotus Notes and Domino wiki.

明日、早速これをxPagesで動く自前のポータルサイトで試してみます。
いい結果になれば、ここで公表できるかも。