EL表达式,如果测试条件为真,则设置var

时间:2013-12-27 16:44:26

标签: el jsp-tags

我的TAG文件中有以下代码块 -

(请参阅我的问题代码块内的注释)

<c:forEach var="headerTab" items="${KualiForm.headerNavigationTabs}" varStatus="status">
   <c:if test="${headerTab.headerTabDisplayName != 'S2S'}">
      <c:choose>
         <c:when test="${headerTab.headerTabDisplayName == 'Key Personnel'}">

                  // (Set the value of the var evaluated in the test above here)
                  // How do I do the following using EL Notation:
                  // headerTab.headerTabDisplayName = 'Some other string';

         </c:when>
      </c:choose>

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用c:set JSTL Tag?它应该是这样的:

<c:set target="headerTab" property="headerTabDisplayName" 
    value="Some other string"/>
相关问题