Struts2 如何将struts 1 select标记和dynamic option标记迁移到struts 2
我在jsp中使用了一个.tag文件Struts2 如何将struts 1 select标记和dynamic option标记迁移到struts 2,struts2,migration,taglib,struts1,Struts2,Migration,Taglib,Struts1,我在jsp中使用了一个.tag文件 <html:select size="5" multiple="true" style="width:150px" styleClass="listBoxHeader searchField" styleId="searchField${fieldCount}" property="values(${field.name})"
<html:select size="5" multiple="true" style="width:150px"
styleClass="listBoxHeader searchField"
styleId="searchField${fieldCount}"
property="values(${field.name})"
disabled="${disabled}">
<c:forEach var="litem" items="${field.selectValueEntries}">
<html:option value="${litem.key}">
<fmt:message var="temp" key="${litem.value}" />
<c:choose>
<c:when test="${fn:startsWith(temp,'???')}">
<c:out value="${litem.value}"/>
</c:when>
<c:otherwise><c:out value="${temp}"/>
</c:otherwise>
</c:choose>
</html:option>
</c:forEach>
</html:select>
在这里,我使用循环和一些条件填充了select选项这是一个.tag文件。如何使用struts 2 select标记迁移此代码。问题在于如何使用S2 select标记?这不仅仅是S2标记的使用,我还有一些场景,其中option标记在一些业务逻辑之后填充到循环中。我想在使用S2 select标记时也这样做,尽管在Java层而不是视图层中这样做更好。