<s:iterator 标签的用法

前提:后台传过来对象bottomGameServer,里面有id的属性,数据库中id对应阿拉伯数字,需要判断下。写法如下:

<s:iterator value="#request.bottomGameServer" id="offset2">
     <li>
          <s:if test="#offset2.id==1 || #offset2.id==2 || #offset2.id==3">
              <a href="${login_Game_Url}" class="default">[${game_AreaName}]${game_Server}</a>                                                          
                         </s:if> 
                         <s:else> 
                             <a href="${login_Game_Url}" target="_blank" class="default">[${game_AreaName}]${game_Server}              </a>                                           
                         </s:else>  
     </li>
    </s:iterator>

posted on 2012-10-10 15:16  专注2018  阅读(473)  评论(0编辑  收藏  举报