03/11/06 01:11
>>35
●●●Velocityの例
<table>
#foreach( $mud in $mudsOnSpecial )
<tr>
<td>$mud</td>
</tr>
#end
</table>
●●●Strutsの例
<table>
<tr jwcid="@Foreach" source="ognl:mudsOnSpecial" value="ognl:mud" element="tr">
<td><span jwcid="@Insert" value="ognl:mud">ほげほげ(仮)</span></td>
</tr>
</table>
VelocityとTapestryの違いわかりますか?
テンプレートファイルを直接ブラウザで見ると、Velocityではtableタグとtrタグの間に文字があるから
ロジックが目に見えるでしょう。
Tapestryの場合、trタグやspanタグの属性にロジックを埋め込めるから、
テンプレートの見た目と実行時の見た目がほぼまったく同じなのです。
画像貼り付けられないのが残念ですが、信じられないならお試しあれ。