<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>無限なる開発ブログ &#187; Tabbed Panel</title>
	<atom:link href="http://www.oto-kichi.com/tag/tabbed-panel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oto-kichi.com</link>
	<description>ロサンゼルス在住ITエンジニアの開発ブログ</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:44:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.oto-kichi.com/tag/tabbed-panel/feed/" />
		<item>
		<title>xPagesのTabbed PanelをPartial RefreshでAjax化させよう</title>
		<link>http://www.oto-kichi.com/2009/10/20/xpages%e3%81%aetabbed-panel%e3%82%92partial-refresh%e3%81%a7ajax%e5%8c%96%e3%81%95%e3%81%9b%e3%82%88%e3%81%86/</link>
		<comments>http://www.oto-kichi.com/2009/10/20/xpages%e3%81%aetabbed-panel%e3%82%92partial-refresh%e3%81%a7ajax%e5%8c%96%e3%81%95%e3%81%9b%e3%82%88%e3%81%86/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 17:11:03 +0000</pubDate>
		<dc:creator>Viruke</dc:creator>
				<category><![CDATA[xPages]]></category>
		<category><![CDATA[Tabbed Panel]]></category>

		<guid isPermaLink="false">http://www.oto-kichi.com/?p=95</guid>
		<description><![CDATA[
			
				
			
		
xPagesのTabbed Panelってとても便利だと思うのですが、デフォルトだと、クリック毎にページ全体を読み直すのでかっこ悪い。
そこで、Partial Refreshを使ってAj [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.oto-kichi.com%2F2009%2F10%2F20%2Fxpages%25e3%2581%25aetabbed-panel%25e3%2582%2592partial-refresh%25e3%2581%25a7ajax%25e5%258c%2596%25e3%2581%2595%25e3%2581%259b%25e3%2582%2588%25e3%2581%2586%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.oto-kichi.com%2F2009%2F10%2F20%2Fxpages%25e3%2581%25aetabbed-panel%25e3%2582%2592partial-refresh%25e3%2581%25a7ajax%25e5%258c%2596%25e3%2581%2595%25e3%2581%259b%25e3%2582%2588%25e3%2581%2586%2F&amp;source=Viruke&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>xPagesのTabbed Panelってとても便利だと思うのですが、デフォルトだと、クリック毎にページ全体を読み直すのでかっこ悪い。<br />
そこで、Partial Refreshを使ってAjax化させてみました。</p>
<blockquote>
<pre>&lt;xp:panel id="container"&gt;
&lt;xp:tabbedPanel id="tabbedPanel1"&gt;
&lt;xp:this.selectedTab&gt;
&lt;![CDATA[#{javascript:(null == sessionScope.selectedTabId) ? "tabPanel1" : sessionScope.selectedTabId}]]&gt;
&lt;/xp:this.selectedTab&gt;
&lt;xp:tabPanel label="Tab1" id="tabPanel1"&gt;
Tab1のコンテンツが入ります。
&lt;xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="container"&gt;
&lt;xp:this.action&gt;
&lt;![CDATA[#{javascript:sessionScope.selectedTabId = "tabPanel1"}]]&gt;&lt;/xp:this.action&gt;
&lt;/xp:eventHandler&gt;
&lt;/xp:tabPanel&gt;
&lt;xp:tabPanel label="Other" id="tabPanel2"&gt;
Tab2のコンテンツが入ります。
&lt;xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="container"&gt;
&lt;xp:this.action&gt;
&lt;![CDATA[#{javascript:sessionScope.selectedTabId = "tabPanel2"}]]&gt;
&lt;/xp:this.action&gt;
&lt;/xp:eventHandler&gt;
&lt;/xp:tabPanel&gt;
&lt;/xp:tabbedPanel&gt;
&lt;/xp:panel&gt;
</pre>
</blockquote>
<p>ここでは、</p>
<p>１）各Tabの中にonclickイベントを作成。<br />
２）Partial UpdateのElementに親タグのID&#8221;container&#8221;をRefreshIDに指定。<br />
３）onclickイベントの中で、各タブごとに、selectedTabIdを以下のように指定する。<br />
sessionScope.selectedTabId = &#8220;tabPanel1&#8243;</p>
<p>しかし、これをデザインのプロパティからやろうとすると、操作が難しい（というか出来ない）ので、ソースをガシガシ書いていくのが吉です。</p>
<p>ちなみに、自分の環境では8.5.0までは &#8220;_10f.push is not a function&#8221;のエラーが出て上手く動いていなかったので、XPages Blogにある通り8.5.1にアップデートしたら問題は解消されました。</p>
<blockquote><p><strong>Partial refresh and Firefox 3.5, Safari, Opera on 8.5.0 &#8211; XPages Blog &#8211; The XPages Blog</strong></p>
<p>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 &#8220;_10f.push is not a function&#8221;.</p>
<p>This happens with Firefox 3.5, Safari 4, Opera and I believe in IE 8, too.There is no workaround at least none I&#8217;m aware of but using full refreshes all the time.But: the solution is underway! This is fixed in the upcoming 8.5.1.</p>
<p>引用元: <a href="http://xpagesblog.com/xpages-blog/2009/7/22/partial-refresh-and-firefox-35-safari-opera-on-850.html" target="_blank">Partial refresh and Firefox 3.5, Safari, Opera on 8.5.0 &#8211; XPages Blog &#8211; The XPages Blog</a>.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.oto-kichi.com/2009/10/20/xpages%e3%81%aetabbed-panel%e3%82%92partial-refresh%e3%81%a7ajax%e5%8c%96%e3%81%95%e3%81%9b%e3%82%88%e3%81%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.oto-kichi.com/2009/10/20/xpages%e3%81%aetabbed-panel%e3%82%92partial-refresh%e3%81%a7ajax%e5%8c%96%e3%81%95%e3%81%9b%e3%82%88%e3%81%86/" />
	</item>
	</channel>
</rss>
