WebアプリケーションでtagCloudを作成しています。2つのリストをレンダリングするメソッドがあります。
public static void tagCloud(){
List<Topic> topics = Topic.find("order by topicName asc").fetch();
List<Tutorial> tutorials = Tutorial.find("order by id asc").fetch();
List<Integer> topicCount = new ArrayList<Integer>();
for(int i = 0; i < topics.size(); i++){
int z = 0;
for(int j = 0; j < tutorials.size(); j++){
if (tutorials.get(j).getTopic().equals(topics.get(i))){
z++;
topicCount.add(z);
}
}
}
render (topics, topicCount);
}
次のような行で、tagCloudにこれら2つのリストを使用したいと思います。
<a href="/Topics/topicView?topicId=${topicList.id}" rel="8">${topicList.topicName.raw()}</a>
topicCountリストのインデックスを「rel」(単語のサイズ)に使用し、トピックを表示する要素自体に使用したいのですが、どうすればよいですか?