Ticket #10556

setDto()はどのように使うのですか?
Open Date: 2007-06-08 13:53 Last Update: 2007-06-13 16:59

Reporter:
(Anonymous)
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None

Details

画面に2重ループがある場合にどうやって値をセットするべ
きか?を教えて頂ければと思います。

以下にHTMLの例をあげますので。

<table border="1" >
<tr>
<div type="loop" name="samplingLoop">
<td class="title">
<span name="titleName"></span>
</td>
</div>
</tr>

<div type="loop" name="itemLineLoop">
<tr>
<div type="loop" name="itemColmLoop">
<td class="title">
<span name="itemValue"></span>
</td>
</div>
</tr>
</div>
</table>

Ticket History (3/4 Histories)

2007-06-10 21:52 Updated by: oakita
Comment
Logged In: YES
user_id=28918

上記のようなループは以下のようにして
データの設定をしてください。


ここから----------------------------------
// item
HashMap<String, Object> line = new
HashMap<String, Object>();

List<HashMap> lineList = new
ArrayList<HashMap>();
for(int i=0;i<50;i++){
HashMap<String, Object> colm =
new HashMap<String, Object>();
List<HashMap> colmList = new
ArrayList<HashMap>();
for(int j=0;j<50;j++){

// Colm
HashMap<String,
Object> itemlist = new HashMap<String, Object>();
itemlist.put
("itemValue","i="+ i+ ", j="+ j);

colmList.add(itemlist);

}
colm.put("itemColmLoop",
colmList);
lineList.add(colm);

}

// Line
line.put("itemLineLoop", lineList);


this.setDto(line);
----------------------------------ここまで

また何かあればご質問ください。
2007-06-13 16:57 Updated by: afurukawa
  • Resolution Update from None to Fixed
2007-06-13 16:58 Updated by: afurukawa
  • Ticket Close date is changed to 2007-06-13 16:58
  • Status Update from Open to Closed
2007-06-13 16:59 Updated by: afurukawa
  • Status Update from Closed to Open

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login