入力があるフォームがあります。各入力は、別のhtmlページの表に表示されるデータのリストを返します。各入力には、そのデータを表示するテーブルがあります。私の仕事は、入力がユーザーによって入力されていない場合、データを表示しないことです。ここでjava:条件に応じてテーブルを表示または非表示にする
は、私は、テーブルを表示しないためにループの外に行くためにブレークを使用しています私のコード
<!-- Country Table-->
<%for(int i = 0; i < countryList.length;i++){
if(countryList.length == 0)
break;
%>
<div class="box" align="center">
<table name="tab" align="center" class="gridtable">
<thead >
<tr>
<th style="width: 50%" scope="col">Entity Watch List Key</th>
<th style="width: 50%" scope="col">Watch List Name</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 50%"><%out.println((String) (countryList[i].getEntityWatchListKey()));%></td>
<td style="width: 50%"><%out.println((String) (countryList[i].getEntityName()));%></td>
</tr>
</tbody>
</table>
</div>
<%}%>
あり、それは本当ですか?