既存の Struts1 アプリケーションを Struts2 に移行するタスクに取り組んでいます。私は問題で立ち往生しています。内で<s:select>
、オプションを で分類する必要があります<optgroup>
。次のコードは、Struts1 でこれを行います。Struts2 でこれを達成するにはどうすればよいですか?
<html:select id="foodList" property="foodItemId" onclick="selectRadio('0')">
<c:if test="${not empty foodList1}">
<optgroup label="Risk Analysis Report Sets">
<c:forEach var="item" items="${foodList1}">
<option value="${item.value}">${item.label}</option>
</c:forEach>
</optgroup>
</c:if>
<c:if test="${not empty foodList2}">
<optgroup label="NMX Report Sets">
<c:forEach var="item" items="${foodList2}">
<option value="${item.value}">${item.label}</option>
</c:forEach>
</optgroup>
</c:if>
<c:if test="${not empty foodList3}">
<optgroup label="Standard Report Sets">
<c:forEach var="item" items="${list3}">
<option value="${item.value}">${item.label}</option>
</c:forEach>
</optgroup>
</c:if>
</html:select>