Monday, May 4, 2020

[Struts][Resolved] Iterator get data from List Array

Suppose you have a source with DataType List<Equip> named equipStatusList.
and there are some field named "code" and "desciption".
<s:iterator value-"equipStatusList" status="statusTitle">
  <th width>
    <div onclick="javascript:toggleSort('${equipStatusList[statusTitle.index].code}')">
      <s:property value="equipStatusList[#statusTitle.index].desciption" />
      <s:if test="%{sortBy[0]==equipStatusList[#statusTitle.index].code}">
        <s:if test='%{sortOrder=="asc"}'>
          &uArr;
        </s:if>
        <s:else>
          &dArr;
        </s:else>
      </s:if>
    </div>
  </th>
</s:iterator>

No comments :

Post a Comment