jsp,xml中el表达式等占位符中的数据操作
来源:互联网 发布:手机淘宝能删除好评吗? 编辑:程序博客网 时间:2024/06/05 16:22
jsp,xml中el表达式等占位符中的数据操作
表达式中可以用传入参数对象具备的一切属性,函数
.xml中
@Column(name="ROLES_KEY")表示也map当前结果集对应的
private String rolesKey;
@Transient,表示不需要结果集中有
在mapper.xml中的表达式中可以用传入参数对象具备的一切属性函数
<select id="getCustomerBankMap1" parameterType="map" resultMap="accountMap">
SELECT T.*,B.BANK_NAME,B.BANK_LOGO
FROM TB_CUS_ACC_INFO T,TB_CUS_BANK B
WHERE T.SIGN_ACCOUNT_BANK=B.BANK_CODE
<if test="customerKey!=null and customerKey!=''">
AND T.CUSTOMER_KEY=#{customerKey}
</if>
<if test="noMarketMark!=null and noMarketMark=='true'.toString()">
AND T.SIGN_ACCOUNT_BANK<![CDATA[<>]]>'000'
</if>
<if test="sign_account_banklist_in!=null and sign_account_banklist_in.size>0">
AND T.SIGN_ACCOUNT_BANK in(
<foreach collection="sign_account_banklist_in" item="item" separator=",">
#{item}
</foreach>
)
</if>
<if test="bankCode!=null and bankCode!=''">
AND T.SIGN_ACCOUNT_BANK =#{bankCode}
</if>
<if test="customerSonKey!=null">
AND T.CUSTOMER_SON_KEY=#{customerSonKey}
</if>
ORDER BY T.ACCOUNT_ID
</select>
在jsp中需要引入jstl函数
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
不仅仅是jstl标签
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
${fn:length(item.man)>8} fn:length()就是一个函数
<c:forEach items="${list}" var="item">
<tr>
<td class="cblue pr5 pl5">
<a href="javascript:void(0);" onclick="window.location.href='${path}/operateUserAction!view.do?key=${item.cusUserKey}'">${item.cusUserId}</a>
</td>
<td class="pr5 pl5" title="${item.man}">
<c:choose>
<c:when test="${fn:length(item.man)>8}">
${item.man.substring(0,1)}
</c:when>
<c:otherwise>
${item.man}
</c:otherwise>
</c:choose>
</td>
<td class="pr5 pl5">
${item.phoneCountryCode} ${item.tel}
</td>
<td class="pl5">
${item.email}
</td>
<td class="cred pr5">
<c:if test="${item.cusUserStatus=='B'}">冻结</c:if>
<c:if test="${item.cusUserStatus=='A'}">正常</c:if>
</td>
<td style="width: 50%;">
<a class="cblue" href="operateUserAction!editUI.do?key=${item.cusUserKey}">编辑</a>
<c:if test="${item.cusUserStatus=='A'}">
<a class="cblue" href="javascript:updateStatus('${item.cusUserKey}','B','${item.cusUserId}');">冻结</a>
</c:if>
<c:if test="${item.cusUserStatus=='B'}">
<a class="cblue" href="javascript:updateStatus('${item.cusUserKey}','A','${item.cusUserId}');">解冻</a>
</c:if>
<a class="cblue" href="operateUserAction!editOperateUserPwdUI.do?key=${item.cusUserKey}">修改密码</a>
</td>
</tr>
</c:forEach>
- jsp,xml中el表达式等占位符中的数据操作
- jsp中EL表达式获取数据
- EL表达式 用于JSP中显示数据
- jsp中的el表达式
- JSP中的EL表达式
- JSP中的El表达式
- jsp中的el表达式
- Jsp中的EL表达式
- JSP中的EL表达式
- JSP中的EL表达式
- JSP中的EL表达式
- JSP中的EL表达式
- JSP中的EL表达式
- JSP:JSP中的EL表达式
- jsp中EL表达式
- Jsp中EL表达式
- java操作XML中的占位符
- JSP中EL表达式使用大于小于等符号
- 缓存的切换
- caffe下cnn调试中碰到Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter
- 教你如何在机器学习竞赛中更胜一筹(上)
- form ajax提交返回html直接嵌入
- 快速功能点方法
- jsp,xml中el表达式等占位符中的数据操作
- Java集合与JSON集合之间的转换
- 0.
- jpa 及spring data jpa开发
- compareTo equals toString 起作用时机
- SQL Server 视图
- jpa嵌入式复合主键
- Android 常用的时间工具类
- Maven的依赖体系