倾城之恋的专栏

不积跬步,无以至千里;不积小流,无以成江海。

关于s:iterator 和s:if 的结合使用

<s:iterator value="UserList" id="UserList">
         <tr>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE1"><s:property value="index" /></span>           
           </div>
          </td>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center" class="STYLE1">
            <div align="center">
             <s:property value="business_name" />
            </div>
           </div>
          </td>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE1"><s:property value="user_name" /></span>
           </div>
          </td>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE1"><s:property value="user_pwd" /></span>
           </div>
          </td>
          <td bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE1">
             <s:if test ="%{#UserList.auth == 1}">
              系统管理员
             </s:if>
             <s:if test ="%{#UserList.auth == 2}">
              商务代表
             </s:if>
            </span>
           </div>
          </td>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE1">
             <s:if test ="%{#UserList.is_del == 0}">
              启用
             </s:if>
             <s:if test ="%{#UserList.is_del== 1}">
              停用
             </s:if>
            </span>
           </div>
          </td>
          <td height="20" bgcolor="#FFFFFF">
           <div align="center">
            <span class="STYLE4"><img src="tab/images/edt.gif"
              width="16" height="16" />编辑&nbsp; &nbsp;<img
              src="tab/images/del.gif" width="16" height="16" />停用</span>
           </div>
          </td>
         </tr>                                   
         </s:iterator>
阅读更多
个人分类: Struts2
上一篇手把手教你mysql(十)索引
下一篇JavaEE项目流程
想对作者说点什么? 我来说一句

s:iterator与s:if结合使用

JIESA JIESA

2014-02-21 09:01:35

阅读数:1247

没有更多推荐了,返回首页

关闭
关闭