[Seasar-user:14518] Re: [Teeda]checkbox に対する label の設定

Nishioka Naoto [E-MAIL ADDRESS DELETED]
2008年 6月 2日 (月) 16:41:39 JST


にしおかです。

小林 (koichik) さん、ありがとうございます。

teedaCustomize.diconに関してですが、
手元にあったファイルにおいては、
<property name="cooperateWithForeach">true</property>
の部分がありませんでした。
(Teedaプロジェクトを生成したときのDoltengの
 バージョン等に依存しているのでしょうか)

この部分を追加すると、ID部分は
org.seasar.teeda.core.render.JsfSpecComponentIdLookupStrategy
に変更しなくても連番が割り振られるようになりました。

ただ、この状態だと、<label for="xxxx">のxxxxの部分が
連番になりません。

そこで、試しに、
<label id="opt" for="checked"><span id="name" te:omittag="true">dummy</span></
label>
のような感じで無理矢理idを指定すると、
forの部分も連番付きの値になりましたが、
<span>〜</span>の部分が無視されてしまい、
テキストが何も出力されませんでした。

(レンダリング結果の例)
<label id="aForm:optionItems:0:opt" for="aForm:optionItems:0:checked"></label>

※この部分の挙動は、JsfSpecComponentIdLookupStrategy
 を使用した場合でも同様でした。

試しに、
<label id="name" for="checked"></label>
のようにした場合も同様の結果でした。

htmlの記載方法が間違えているのでしょうか。
よろしくお願いします。

----- Original Message -----
>Date: Mon, 02 Jun 2008 15:30:59 +0900
>From: Koichi Kobayashi <[E-MAIL ADDRESS DELETED]>
>To: [E-MAIL ADDRESS DELETED]
>Subject: [Seasar-user:14516] Re:
> [Teeda]checkbox に対する label の設定
>
>
>小林 (koichik) です.
>
>アプリケーション全体の設定になってしまいますが,
>teedaCustomize.dicon で
>
><component class="org.seasar.teeda.core.render.DefaultComponentIdLookupStrate
gy">
>    <property name="cooperateWithForeach">true</property>
></component>
><!-- JSF標準のIDの採番方式にしなくてはいけない場合は下記を使用。 -->
><!--
><component class="org.seasar.teeda.core.render.JsfSpecComponentIdLookupStrate
gy"/>
>-->
>
>となっているところを
>
><!-- JSF標準のIDの採番方式にしなくてはいけない場合は下記を使用。 -->
><component class="org.seasar.teeda.core.render.JsfSpecComponentIdLookupStrate
gy"/>
>
>とすれば id が name と同様に index を含むように
>なると思います.


------------------------------
Nishioka Naoto



Seasar-user メーリングリストの案内