setprop.tag
来自「ajax基础操作实例,无刷添加删除等..」· TAG 代码 · 共 34 行
TAG
34 行
<%@ attribute name="name" required="true" rtexprvalue="true" %>
<%@ attribute name="array" required="false" rtexprvalue="true"
type="java.lang.Boolean" %>
<%@ attribute name="bool" required="false" rtexprvalue="true"
type="java.lang.Boolean" %>
<%@ tag body-content="empty" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="dfu" tagdir="/WEB-INF/tags/dynamic/forms/util" %>
<c:set var="propValue" value="${null}"/>
<c:if test="${formPost && empty formErrors[name]}">
<c:if test="${!array && !bool && !empty param[name]}">
<c:set var="propValue" value="${param[name]}"/>
</c:if>
<c:if test="${!array && bool}">
<c:set var="propValue" value="${!empty param[name]}"/>
</c:if>
<c:if test="${array && fn:length(paramValues[name]) > 0}">
<c:set var="propValue" value="${paramValues[name]}"/>
</c:if>
</c:if>
<c:if test="${propValue != null}">
<c:catch var="exception">
<c:set target="${formModel}" property="${name}" value="${propValue}"/>
</c:catch>
<c:if test="${exception != null}">
<dfu:addError name="${name}" msg="${exception.message}"
exception="${exception}"/>
</c:if>
</c:if>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?