2007年5月26日土曜日

[Teeda] ForEachでcheckboxを使うとエラー(解決)

ForEachでcheckboxを使うと、submit時に
TForEachで
23:36:45,062 DEBUG TeedaExtensionErrorPageManagerImpl#debug: 65 - 0
java.lang.ArrayIndexOutOfBoundsException: 0
at org.seasar.teeda.extension.component.TForEach.processUpdates(TForEach.java:382)
というエラーが出て、しばらく悩んだが解決。
原因はhtmlに
<input type="hidden" id="hogeItemsSave"/>
が無かったため。
submit時にはForEachで出力したオブジェクトデータも
一緒に送信しなければ、html出力時のオブジェクト配列(リスト)の
状態を復元できないので、当たり前だ。

2007年5月23日水曜日

[Oracle] 使用しているキャラクタエンコーディングの確認方法

以下のSQLを実行する。

SELECT NLS_CHARSET_NAME(NLS_CHARSET_ID('CHAR_CS')),
NLS_CHARSET_NAME(NLS_CHARSET_ID('NCHAR_CS')) FROM DUAL

2007年5月21日月曜日

[Teeda] SelectOneRadioにonclickイベントを設定するには

以下のように書く。
ラジオボタン毎のonclick属性にspanのonclickで書いた内容が設定される。

<span id="hoge" onclick="fuga();">
<input type="radio" name="hoge" value="1" checked="checked"/>hoge1
<input type="radio" name="hoge" value="2"/>hoge2
</span>

2007年5月10日木曜日

[Teeda] パラメタに固定値を渡す方法

Teedaではページにパラメタを渡す場合、

hoge

とできるが、上記のcd,editModeはページのcd,editModeプロパティに
置換して出力される。
editMode=2と固定値で出力するには、頭にfixed_を付加し、
hoge
とすればよい。

2007年4月28日土曜日

[Eclipse][Tomcat] Tomcatプラグイン

TomcatプラグインのEclipse3.2版が正式リリースされていた。

http://www.eclipsetotale.com/tomcatPlugin.html

2007年4月17日火曜日

BIRT PDF出力に失敗する

BIRT2.1.2でレポートのPDFプレビュー時に、Eclipseのツールバーより[View report as PDF]を選ぶと、
以下のエラーが発生する。

org.eclipse.birt.report.service.api.ReportServiceException: Report engine fails to create extension to handle this request.

http://www.eclipse.org/birt/phoenix/build/#itextによると、

BIRT 2.1.0 (or later)
The itext-1.3.jar file needs to be copied to the plugins/com.lowagie.itext_*/lib directory.

Birt 2.1.1 or Later Note:
* To Support Asian fonts in PDF, download the following jar and place it in the plugins/com.lowagie.itext_*/lib directory.
iTextAsian.jar.

と書いてある。
lib以下に、itext-1.3.jar, iTextAsian.jarをコピーしたら、正常に動作した。
おお、素晴らしい。

ここも参照。