△△もまいら漏れにStrutsの良さを教えてください
■ このスレッドは過去ログ倉庫に格納されています
0715デフォルトの名無しさん
NGNGそういう真性MVCマニアの人は、たとえば検索結果をリスト表示する、などのときはどう書くのですか?
pubic List getResults(){ return this.results; }
<ol><logic:iterate ... property="results">
<li><bean:write ... property="title /></li>
</logic:iterate></ol>
の代わりに
public String getResults(){
Iterator it = this.results.iteraotr();
StringBuffer buf = new StringBuffer();
whiie( it.hasNext() ){
ResultBean result = (ResultBean)it.next();
buf.append( "<li>" + result.getTitle() + "</li>" );
}
return result.toString();
}
<ol><bean:write ... proprety="results" /></ol>
みたいなやり方しか想像つかないんですが。。
すべてのHTMLタグをJSP側に書きつつlogicタグを使わないなんて可能なんですか?
■ このスレッドは過去ログ倉庫に格納されています