<?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>ueblog &#187; Teeda</title>
	<atom:link href="http://ueblog.natural-wave.com/tag/teeda/feed/" rel="self" type="application/rss+xml" />
	<link>http://ueblog.natural-wave.com</link>
	<description>Web関連のネタを中心に役立つ情報を配信しています。</description>
	<lastBuildDate>Wed, 11 Jan 2012 00:51:56 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/tag/teeda/feed/" />
		<item>
		<title>iPod Touch Offline Readerの仕様詳細</title>
		<link>http://ueblog.natural-wave.com/2008/02/09/ipod-touch-offline-reader-detail/</link>
		<comments>http://ueblog.natural-wave.com/2008/02/09/ipod-touch-offline-reader-detail/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 14:05:10 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[サービス]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/02/09/ipod-touch-offline-reader-detail/</guid>
		<description><![CDATA[「iPod Touch Offline Reader」を開発して放置していたんですが、RSSフィード登録の部分がずっとエラーになってました。。。が、直しました。気を取り直してデザインを変えて再公開します！ さて、このツールは何で作っているのかというと、iPod側のイン]]></description>
			<content:encoded><![CDATA[<p>「<a href="http://ipod.oflive.net/" target="_blank">iPod Touch Offline Reader</a>」を開発して放置していたんですが、RSSフィード登録の部分がずっとエラーになってました。。。が、直しました。気を取り直してデザインを変えて再公開します！</p>
<p><a href="http://ipod.oflive.net/"  title="iPod Touch Offline Reader"><img src="http://ueblog.natural-wave.com/wp-content/uploads/2008/02/s-ipod-touch-offline-reader.jpg" alt="iPod Touch Offline Reader" /></a></p>
<p>さて、このツールは何で作っているのかというと、iPod側のインターフェースは<a href="http://code.google.com/p/iui/" target="_blank">iui</a>というjavascriptとcssのライブラリ。divタグとページ内リンクで、iPod Touchのsafariでスライドするようなインターフェースが簡単に作成できる。</p>
<p>そしてサーバ側は、Apache + Tomcat。Webフレームワークは、Teeda + DBFluteで作成。RSS取得部分は<a href="https://rome.dev.java.net/" target="_blank">Rome</a>というJavaのライブラリを使っている。このRomeが結構優秀で、さまざまなRSSやAtomフィードを共通のインターフェースで中身の取得ができます。</p>
<p>iPod TouchをJailbreakしなくても、オフラインRSSリーダーっぽくできないものかと思って作成したんですが、欠点はURLを手入力するのがとても面倒なこと、一度iPod Touchの電源を切ってからsafariを立ち上げ直すと、再アクセスしてしまい、オフラインでの閲覧ができないこと、、などなどたくさんあるんですが、一度使っていただいてご意見なんか、このブログのコメントに入れて欲しいなあと思ってます。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/02/09/ipod-touch-offline-reader-detail/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/02/09/ipod-touch-offline-reader-detail/" />
	</item>
		<item>
		<title>Webフレームワークの選択</title>
		<link>http://ueblog.natural-wave.com/2008/01/26/web%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af%e3%81%ae%e9%81%b8%e6%8a%9e/</link>
		<comments>http://ueblog.natural-wave.com/2008/01/26/web%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af%e3%81%ae%e9%81%b8%e6%8a%9e/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 16:04:21 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/01/26/web%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af%e3%81%ae%e9%81%b8%e6%8a%9e/</guid>
		<description><![CDATA[Webフレームワークの選択。それはあらゆる面で考えないといけない。 重視すべき部分はどこにあるのだろうか。考えてみた。 フレームワークの機能性 導入実績と情報の多さ パフォーマンス 開発効率 メンテナンス性 一般的には、こ]]></description>
			<content:encoded><![CDATA[<p>Webフレームワークの選択。それはあらゆる面で考えないといけない。</p>
<p>重視すべき部分はどこにあるのだろうか。考えてみた。</p>
<ol>
<li>フレームワークの機能性</li>
<li>導入実績と情報の多さ</li>
<li>パフォーマンス</li>
<li>開発効率</li>
<li>メンテナンス性</li>
</ol>
<p>一般的には、こういった項目が挙げられるだろう。</p>
<p>ただ多人数で開発する場合は、他に重要な要素が絡む。</p>
<ol>
<li>開発メンバーのスキル</li>
<li>教育コスト</li>
</ol>
<p>では、具体的に個人的に現在のところ、使ってみたいフレームワークをあげてみると、こんな感じだ。</p>
<p><strong>perl</strong></p>
<blockquote><p><strong>Sledge</strong></p>
<blockquote><p>一番利用してきたフレームワークで使い勝手は良い。ただ情報の少なさとメンテナンスされていない部分が不安。</p></blockquote>
<p><strong>Catalyst</strong></p>
<blockquote><p>Perlのフレームワークでは一番有名？ 情報は少ない。</p></blockquote>
</blockquote>
<p><strong>Java</strong></p>
<blockquote><p><strong>Teeda + DBFlute</strong></p>
<blockquote><p>個人的には一押し。自サイトではメインで利用している。 MLなどでは、かなり情報が出てきているが、利用実績はまだまだ。</p></blockquote>
<p><strong>SAStruts + J2JDBC</strong></p>
<blockquote><p>今一番利用してみたいフレームワーク。まだRC４の段階。</p></blockquote>
</blockquote>
<p><strong>PHP</strong></p>
<blockquote><p><strong>CakePHP</strong></p>
<blockquote><p>かなり簡単に導入できかつ、利用者はかなり多い。PHP4,5両方のバージョンで利用可能。個人利用には一番お手軽だが、規模が大きくなると不安</p></blockquote>
<p><strong>Symfony</strong></p>
<blockquote><p>PHPのフレームワークの中でも洗練されているイメージ。</p></blockquote>
<p><strong>Zend</strong></p>
<blockquote><p> PHPの中でも一番注目されているフレームワーク。ただ、現時点での導入はまだ早い。</p></blockquote>
</blockquote>
<p><strong>Ruby</strong></p>
<blockquote><p><strong>Ruby on Rails</strong></p>
<blockquote><p>現在のWebフレームワークの潮流を作ってきたと言っても良い。パフォーマンスでいろいろと言われているが、開発効率は一番ではないか。</p></blockquote>
</blockquote>
<p><strong>perl</strong>は、Amazonやはてな、mixiなど大規模なサイトで利用されているが、いわゆる自作フレームワークを利用しているものが多く、世の中にperlの決定的なフレームワークがないのが残念。</p>
<p><strong>Java</strong>は、Seasarがオールインワン系のWebフレームワークを作ってはいるものの、ほとんど組み合わせが多く、お手軽にとはいかない。APサーバの設置や運用もやったことない人には不安な部分。ただ言語の魅力はいまだ大きい。</p>
<p><strong>PHP</strong>は、正直フレームワークを使ったことがないが、利用者の多さとお手軽さはやはり魅力。</p>
<p><strong>Rails</strong>については、その使いやすさは折り紙つきだが、パフォーマンスはやっぱり気になる。</p>
<p>というわけで、いろいろと熟考の結果、<strong>PHP</strong>を試してみることにした。食わず嫌いだった<strong>PHP</strong>。果たしてどんな使い勝手なのか、楽しみだ。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/01/26/web%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af%e3%81%ae%e9%81%b8%e6%8a%9e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/01/26/web%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af%e3%81%ae%e9%81%b8%e6%8a%9e/" />
	</item>
		<item>
		<title>TeedaのカスタムValidator</title>
		<link>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%ae%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0validator/</link>
		<comments>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%ae%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0validator/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 13:35:59 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%ae%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0validator/</guid>
		<description><![CDATA[前回に引き続き、Validator。今回は、自前のカスタムValidatorを作るときどうするかっていう、備忘録です。 もし、あるDBの項目で重複を許したくない場合（ユニークチェックですね）を例として取り上げます。 環境はTeeda + DBFluteを想定し、EMPテーブルのidとい]]></description>
			<content:encoded><![CDATA[<p>前回に引き続き、Validator。今回は、自前のカスタムValidatorを作るときどうするかっていう、備忘録です。</p>
<p>もし、あるDBの項目で重複を許したくない場合（ユニークチェックですね）を例として取り上げます。</p>
<p>環境はTeeda + DBFluteを想定し、EMPテーブルのidという項目の重複がある場合にエラーとなる場合です。</p>
<p>まずは、javax.faces.validator.Validatorインターフェースを継承したMyEmpDuplicateValidatorクラスを作成します。場所はDoltengであらかじめ作成されているvalidatorというディレクトリに置きました。</p>
<p>MyEmpDuplicateValidator.java</p>
<div class="igBar"><span id="ljava-5"><a href="#" onclick="javascript:showPlainTxt('java-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-5">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package examples.<span style="color: #006600;">teeda</span>.<span style="color: #006600;">validator</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.FacesException;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.application.FacesMessage;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.component.EditableValueHolder;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.component.UIComponent;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.context.FacesContext;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.internal.FacesMessageUtil;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.internal.UIComponentUtil;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.internal.UIInputUtil;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.validator.Validator;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.faces.validator.ValidatorException;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.framework.container.annotation.tiger.Binding;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.framework.container.annotation.tiger.BindingType;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.framework.util.AssertionUtil;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import examples.teeda.dbflute.cbean.EmpCB;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import examples.teeda.dbflute.exbhv.EmpBhv;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyEmpDuplicateValidator <span style="color: #000000; font-weight: bold;">implements</span> Validator <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> MESSAGE_ID = <span style="color: #ff0000;">"examples.teeda.validator.EmpDuplicateValidator.INVALID"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; @<a href="http://www.google.com/search?q=allinurl%3ABinding+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Binding</span></a><span style="color: #66cc66;">&#40;</span>bindingType = <a href="http://www.google.com/search?q=allinurl%3ABindingType+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">BindingType</span></a>.<span style="color: #006600;">MUST</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> EmpBhv empBhv;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> validate<span style="color: #66cc66;">&#40;</span>FacesContext context, UIComponent component,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> FacesException <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// nullな場合無視します。</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; AssertionUtil.<span style="color: #006600;">assertNotNull</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"context"</span>, context<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; AssertionUtil.<span style="color: #006600;">assertNotNull</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"component"</span>, component<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>UIInputUtil.<span style="color: #006600;">isEmpty</span><span style="color: #66cc66;">&#40;</span>value<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> s = value.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// EMPテーブルのid項目に対して件数を取得しています。</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; FeedCB cb = <span style="color: #000000; font-weight: bold;">new</span> FeedCB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; cb.<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setId_Equal</span><span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> count = empBhv.<span style="color: #006600;">selectCount</span><span style="color: #66cc66;">&#40;</span>cb<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>count&gt; <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> submittedValue = EditableValueHolder.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006600;">cast</span><span style="color: #66cc66;">&#40;</span>component<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getSubmittedValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args = <span style="color: #66cc66;">&#123;</span> UIComponentUtil.<span style="color: #006600;">getLabel</span><span style="color: #66cc66;">&#40;</span>component<span style="color: #66cc66;">&#41;</span>,submittedValue<span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> FacesMessage message = FacesMessageUtil.<span style="color: #006600;">getMessage</span><span style="color: #66cc66;">&#40;</span>context, MESSAGE_ID, args<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> ValidatorException<span style="color: #66cc66;">&#40;</span>message, MESSAGE_ID, args<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
validateメソッドを実装します。その中で、DBにアクセスする必要があるので、DBFluteのBehaviorをInjectさせて、件数を取得し、件数がある場合に、JSFの作法にのっとり、ValidatorExceptionをthrowしてます。</p>
<p>また、MESSAGE_IDで指定した、文言がエラーとして出力されるので、resourcesのpropertyファイルに追記しておきます。</p>
<p>appMessages_ja.properties</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">examples.<span style="">teeda</span>.<span style="">validator</span>.<span style="">EmpDuplicateValidator</span>.<span style="">INVALID</span> = IDが重複しています。 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>そして、アノテーションを使えるようにするためにインターフェースを作成します。場所は上記と同じ場所に配置しました。</p>
<p>EmpDuplicateValidator.java</p>
<div class="igBar"><span id="ljava-7"><a href="#" onclick="javascript:showPlainTxt('java-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-7">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package examples.<span style="color: #006600;">teeda</span>.<span style="color: #006600;">validator</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.lang.annotation.ElementType;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.lang.annotation.Retention;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.lang.annotation.RetentionPolicy;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.lang.annotation.Target;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.teeda.extension.annotation.validator.Validator;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Retention<span style="color: #66cc66;">&#40;</span>RetentionPolicy.<span style="color: #006600;">RUNTIME</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Target<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span> ElementType.<span style="color: #006600;">FIELD</span>, ElementType.<span style="color: #006600;">METHOD</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Validator<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"myEmpDuplicateValidator"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> @<span style="color: #000000; font-weight: bold;">interface</span> EmpDuplicateValidator <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで、Pageクラスなどで</p>
<div class="igBar"><span id="ljava-8"><a href="#" onclick="javascript:showPlainTxt('java-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-8">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@EmpDuplicateValidator</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> id; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
と書くだけで、重複チェックが行われるわけです。</p>
<p>少しややこしいように見えますが、一度やってしまうと簡単にカスタムValidatorが作れます。便利ですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%ae%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0validator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%ae%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0validator/" />
	</item>
		<item>
		<title>Teedaで正規表現のValidate</title>
		<link>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%aevalidate/</link>
		<comments>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%aevalidate/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 15:18:04 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%aevalidate/</guid>
		<description><![CDATA[Teedaを利用していて、フォームの入力チェックで正規表現を使いたい場合、 Pageクラスで PLAIN TEXT JAVA: public class TestPage &#123; &#160; &#160; @RegularExpression&#40;pattern = "[0-9a-zA-Z]+"&#41; &#160; &#160; public String title; ～ &#125; アノテーションを利用する場合はこのように書く。 （例は英数字のみのチェック） そして、HTMLは PLAIN TEXT HTML: &#60;span id="allMessages"&#62;&#60;/span&#62; &#60;input type="text" id="title" title="タイトル" /&#62; と書いておけば、そこにエラー文言が表]]></description>
			<content:encoded><![CDATA[<p>Teedaを利用していて、フォームの入力チェックで正規表現を使いたい場合、</p>
<p>Pageクラスで</p>
<div class="igBar"><span id="ljava-11"><a href="#" onclick="javascript:showPlainTxt('java-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-11">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestPage <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; @RegularExpression<span style="color: #66cc66;">&#40;</span>pattern = <span style="color: #ff0000;">"[0-9a-zA-Z]+"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> title;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">～</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
アノテーションを利用する場合はこのように書く。<br />
（例は英数字のみのチェック）</p>
<p>そして、HTMLは</p>
<div class="igBar"><span id="lhtml-12"><a href="#" onclick="javascript:showPlainTxt('html-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-12">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"allMessages"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"title"</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">"タイトル"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
と書いておけば、そこにエラー文言が表示される。すごく直感的、簡単でわかりやすい！</p>
<p>でも、エラー文言は</p>
<blockquote><p>値(タイトル)は正規表現([0-9a-zA-Z]+)にマッチしません。</p></blockquote>
<p>これがデフォルト。<br />
気持ちはわかるが、これデフォルトで使う人いないっしょ！</p>
<p>あと、話はそれるが、DynamicPropertyの話。<br />
htmlの属性値を変更できる機能だが、id属性の値を変更できない。。これなんとかしてほしいなあ。</p>
<p>そもそもTeeda Extensionは、xercesを利用してHTMLをパースする仕様なんで、ちゃんとしたxhtml書かないとだめ。テンプレートでもちゃんとしたHTMLを書かねばならんので、結構融通が利かない場合が多い。</p>
<p>テンプレートエンジンの差し替えが簡単なら、他のテンプレートエンジンの組み合わせも考えていきたい。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%aevalidate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/01/06/teeda%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%aevalidate/" />
	</item>
		<item>
		<title>Teeda HTMLでリンクURLを書き換えるには？</title>
		<link>http://ueblog.natural-wave.com/2007/12/17/teeda-html%e3%81%a7%e3%83%aa%e3%83%b3%e3%82%afurl%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e3%81%ab%e3%81%af%ef%bc%9f/</link>
		<comments>http://ueblog.natural-wave.com/2007/12/17/teeda-html%e3%81%a7%e3%83%aa%e3%83%b3%e3%82%afurl%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e3%81%ab%e3%81%af%ef%bc%9f/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 15:25:38 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2007/12/17/teeda-html%e3%81%a7%e3%83%aa%e3%83%b3%e3%82%afurl%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e3%81%ab%e3%81%af%ef%bc%9f/</guid>
		<description><![CDATA[TeedaのHTML上でリンク（aタグのhref属性）を書き換えるにはどうする？ 答えは、Dynamic Propertyを利用する。 view PLAIN TEXT HTML: &#60;a id="url" href="" target="_blank"&#62;外部リンク&#60;/a&#62; Pageクラス PLAIN TEXT JAVA: private String url; //Dynamic Propertyを使って、urlを書き換え public String getUrlHref&#40;&#41;&#123; &#160; &#160; return this.url; &#125; Dynamic Propertyは、先頭にget + (id) + (属性名)という、getterを用意すれば、その属性の値を変換してくれる。 それでは、画面遷移などでgoを]]></description>
			<content:encoded><![CDATA[<p>TeedaのHTML上でリンク（aタグのhref属性）を書き換えるにはどうする？</p>
<p>答えは、Dynamic Propertyを利用する。</p>
<p>view</p>
<div class="igBar"><span id="lhtml-19"><a href="#" onclick="javascript:showPlainTxt('html-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-19">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"url"</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">""</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">"_blank"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>外部リンク<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Pageクラス</p>
<div class="igBar"><span id="ljava-20"><a href="#" onclick="javascript:showPlainTxt('java-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-20">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> url;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//Dynamic Propertyを使って、urlを書き換え</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getUrlHref<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">url</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Dynamic Propertyは、先頭にget + (id) + (属性名)という、getterを用意すれば、その属性の値を変換してくれる。</p>
<p>それでは、画面遷移などでgoをくっつける場合はどうなるか。<br />
view</p>
<div class="igBar"><span id="lhtml-21"><a href="#" onclick="javascript:showPlainTxt('html-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-21">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"goUrl"</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">""</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>リンク<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Pageクラス</p>
<div class="igBar"><span id="ljava-22"><a href="#" onclick="javascript:showPlainTxt('java-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-22">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> url;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//Dynamic Propertyを使って、urlを書き換え+goを利用</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getGoUrlHref<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">url</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
get + Go + (id) + (属性名)なgetterを用意すればよい。</p>
<p>さて、javascript内などに、HTMLを表示する段階で動的に値を渡してあげるには？<br />
view</p>
<div class="igBar"><span id="lhtml-23"><a href="#" onclick="javascript:showPlainTxt('html-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-23">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"hoge"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">alert(document.getElementById(&quot;mapx&quot;).innerHTML);</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Pageクラス</p>
<div class="igBar"><span id="ljava-24"><a href="#" onclick="javascript:showPlainTxt('java-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-24">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> hoge;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setHoge<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> hoge<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">hoge</span> = hoge;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">Class</span> prerender<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; setHoge<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"javascriptに値を渡す。"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
という感じで、span経由で渡すことで可能。でもspanタグを隠さないとHTMLとして見えてしまうので微妙。</p>
<p>もっといい方法はないものか。</p>
<hr />
明日から、台湾出張です。台湾のインターネット事情がわかればレポートします。<br />
しかし、昨日テレビで見た、日航機墜落と大韓航空爆破のドキュメンタリーを見てしまい、飛行機が若干怖くなった。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2007/12/17/teeda-html%e3%81%a7%e3%83%aa%e3%83%b3%e3%82%afurl%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e3%81%ab%e3%81%af%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2007/12/17/teeda-html%e3%81%a7%e3%83%aa%e3%83%b3%e3%82%afurl%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%82%8b%e3%81%ab%e3%81%af%ef%bc%9f/" />
	</item>
		<item>
		<title>Teeda + DBFlute環境でバッチ作成</title>
		<link>http://ueblog.natural-wave.com/2007/12/15/teeda-dbflute-batch/</link>
		<comments>http://ueblog.natural-wave.com/2007/12/15/teeda-dbflute-batch/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 14:35:48 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[DBFlute]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2007/12/15/teeda-dbflute-batch/</guid>
		<description><![CDATA[現在、Teeda + DBFluteな環境で、Webアプリを製作中なわけですが、DBを更新する処理とかのバッチ作成する時って、どこにソースを配置すべきなんでしょう。 考えた末、、Webアプリと混在する環境に置く事に。 javaのソースディレクトリにbatchっていうのを]]></description>
			<content:encoded><![CDATA[<p>現在、Teeda + DBFluteな環境で、Webアプリを製作中なわけですが、DBを更新する処理とかのバッチ作成する時って、どこにソースを配置すべきなんでしょう。</p>
<p>考えた末、、Webアプリと混在する環境に置く事に。</p>
<p><a href='http://ueblog.natural-wave.com/wp-content/uploads/2007/12/home.jpg' title='teeda-batch' rel="lightbox"><img src='http://ueblog.natural-wave.com/wp-content/uploads/2007/12/home.thumbnail.jpg' alt='teeda-batch' /></a></p>
<p>javaのソースディレクトリにbatchっていうのを作って、そこにmain関数を書いてしまう。<br />
そして、ソースはこんな感じで。<br />
<br clear="all"/></p>
<div class="igBar"><span id="ljava-26"><a href="#" onclick="javascript:showPlainTxt('java-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-26">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.framework.container.S2Container;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.seasar.framework.container.factory.S2ContainerFactory;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import sample.dbflute.exbhv.MemberBhv;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import sample.dbflute.exentity.Member;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> S2PATH = <span style="color: #ff0000;">"dbflute.dicon"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; S2Container container = S2ContainerFactory.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span>S2PATH<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; container.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MemberBhv memberBhv</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #66cc66;">&#40;</span>memberBhv<span style="color: #66cc66;">&#41;</span>container.<span style="color: #006600;">getComponent</span><span style="color: #66cc66;">&#40;</span>MemberBhv.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AMember+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Member</span></a> member = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AMember+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Member</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; member.<span style="color: #006600;">setId</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; member.<span style="color: #006600;">setName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"name"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; memberBhv.<span style="color: #006600;">insert</span><span style="color: #66cc66;">&#40;</span>member<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> e<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.<span style="color: #006600;">printStackTrace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; container.<span style="color: #006600;">destroy</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
S2Containerを呼び出し、Behaviorを作成。Behaviorを通して簡単なinsert処理を。<br />
これで完了。</p>
<p>いちおう、Container経由でWebで作ったロジックもちゃんと呼べたりもしますし、DBFluteの便利なBehaviorやConditionBeanも呼び出せるので、これでええかなと。</p>
<p>しかし、調べてみるといろいろ意見があったりしてます。<br />
<a href="https://ml.seasar.org/archives/seasar-user/2007-August/011996.html" target="_blank">https://ml.seasar.org/archives/seasar-user/2007-August/011996.html<br />
</a></p>
<p>最適な解は何なんでしょう。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2007/12/15/teeda-dbflute-batch/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2007/12/15/teeda-dbflute-batch/" />
	</item>
		<item>
		<title>Teedaの使いにくい点</title>
		<link>http://ueblog.natural-wave.com/2007/09/17/s2-teeda/</link>
		<comments>http://ueblog.natural-wave.com/2007/09/17/s2-teeda/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 14:50:03 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[Teeda]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2007/09/17/s2-teeda/</guid>
		<description><![CDATA[最近家でもりもりとプログラムを作成していて、サーバー側の実装はお気に入りのSeasar2 Teedaを利用しているのですが、どうも納得のいかん部分があるので書いておきます。 １．URLを操作しにくい。 Webアプリケーションを作成する上でURLのつけ]]></description>
			<content:encoded><![CDATA[<p>最近家でもりもりとプログラムを作成していて、サーバー側の実装はお気に入りのSeasar2 Teedaを利用しているのですが、どうも納得のいかん部分があるので書いておきます。</p>
<p><strong>１．URLを操作しにくい。</strong><br />
Webアプリケーションを作成する上でURLのつけ方にはこだわりを持ちたいものですが、URLの操作がしにくい。/view/サブアプリケーション名/○○.htmlみたいな形にしかできない。diconの書き換えをすればできるかもですが、この辺は作成する側に任せてほしい。ApacheのRewriteなどで対応できそうではあるが。</p>
<p><strong>２．GETメソッドって使える？</strong><br />
基本はPRGパターン（POST-REDIRECT-GET）になっていて、スコープの状態を保存して画面遷移するみたいですが、たとえば、検索などでURLにパラメーターを残したい場合に対応できない。これももう少し調べるとできるのかもだが、まだよくわかってません。</p>
<p><strong>３．HTMLのチェックが厳格すぎる。</strong><br />
これを言ってしまえば、フレームワーク使うなって話だけど、結局HTMLってプログラマー以外の人も触るものだし、なんとかならんかなとも思ったりする。</p>
<p>業務系のWebアプリとか、フォーム系の処理なんかは、すごくマッチするフレームワークだと思うけど、例えば簡単な携帯サイトや検索アプリなんかは作りにくいなあと感じます。</p>
<p>まだ不勉強でこんなことを言ってますが、初心者が陥りやすいミスとか気づいたこととかあれば、またこのブログに載せていきます。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2007/09/17/s2-teeda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2007/09/17/s2-teeda/" />
	</item>
	</channel>
</rss>

