JSTL 1.1 functions library
JSTL functions sys
1.1
fns
http://java.sun.com/jsp/jstl/functionss
获取管理路径
getAdminPath
com.thinkgem.jeesite.common.config.Global
java.lang.String getAdminPath()
${fns:getAdminPath()}
获取网站路径
getFrontPath
com.thinkgem.jeesite.common.config.Global
java.lang.String getFrontPath()
${fns:getFrontPath()}
获取网站URL后缀
getUrlSuffix
com.thinkgem.jeesite.common.config.Global
java.lang.String getUrlSuffix()
${fns:getUrlSuffix()}
获取配置
getConfig
com.thinkgem.jeesite.common.config.Global
java.lang.String getConfig(java.lang.String)
${fns:getConfig(key)}
获取常量
getConst
com.thinkgem.jeesite.common.config.Global
java.lang.Object getConst(java.lang.String)
${fns:getConst(key)}
获取当前用户对象
getUser
com.thinkgem.jeesite.modules.sys.utils.UserUtils
com.thinkgem.jeesite.modules.sys.entity.User getUser()
${fns:getUser()}
根据编码获取用户对象
getUserById
com.thinkgem.jeesite.modules.sys.utils.UserUtils
com.thinkgem.jeesite.modules.sys.entity.User get(java.lang.String)
${fns:getUserById(id)}
获取授权用户信息
getPrincipal
com.thinkgem.jeesite.modules.sys.utils.UserUtils
com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal getPrincipal()
${fns:getPrincipal()}
获取当前用户的菜单对象列表
getMenuList
com.thinkgem.jeesite.modules.sys.utils.UserUtils
java.util.List getMenuList()
${fns:getMenuList()}
获取当前用户的区域对象列表
getAreaList
com.thinkgem.jeesite.modules.sys.utils.UserUtils
java.util.List getAreaList()
${fns:getAreaList()}
获取当前用户的部门对象列表
getOfficeList
com.thinkgem.jeesite.modules.sys.utils.UserUtils
java.util.List getOfficeList()
${fns:getOfficeList()}
获取当前用户缓存
getCache
com.thinkgem.jeesite.modules.sys.utils.UserUtils
java.lang.Object getCache(java.lang.String, java.lang.Object)
${fns:getCache(cacheName, defaultValue)}
获取字典标签
getDictLabel
com.thinkgem.jeesite.modules.sys.utils.DictUtils
java.lang.String getDictLabel(java.lang.String, java.lang.String, java.lang.String)
${fns:getDictLabel(value, type, defaultValue)}
获取字典标签(多个)
getDictLabels
com.thinkgem.jeesite.modules.sys.utils.DictUtils
java.lang.String getDictLabels(java.lang.String, java.lang.String, java.lang.String)
${fns:getDictLabels(values, type, defaultValue)}
获取字典值
getDictValue
com.thinkgem.jeesite.modules.sys.utils.DictUtils
java.lang.String getDictValue(java.lang.String, java.lang.String, java.lang.String)
${fns:getDictValue(label, type, defaultValue)}
获取字典对象列表
getDictList
com.thinkgem.jeesite.modules.sys.utils.DictUtils
java.util.List getDictList(java.lang.String)
${fns:getDictList(type)}
获取字典对象列表
getDictListJson
com.thinkgem.jeesite.modules.sys.utils.DictUtils
java.lang.String getDictListJson(java.lang.String)
${fns:getDictListJson(type)}
URL编码
urlEncode
com.thinkgem.jeesite.common.utils.Encodes
java.lang.String urlEncode(java.lang.String)
${fns:urlEncode(part)}
URL解码
urlDecode
com.thinkgem.jeesite.common.utils.Encodes
java.lang.String urlDecode(java.lang.String)
${fns:urlDecode(part)}
HTML编码
escapeHtml
com.thinkgem.jeesite.common.utils.Encodes
java.lang.String escapeHtml(java.lang.String)
${fns:escapeHtml(html)}
HTML解码
unescapeHtml
com.thinkgem.jeesite.common.utils.Encodes
java.lang.String unescapeHtml(java.lang.String)
${fns:unescapeHtml(html)}
从后边开始截取字符串
substringAfterLast
org.apache.commons.lang3.StringUtils
java.lang.String substringAfterLast(java.lang.String, java.lang.String)
${fns:substringAfterLast(str,separator)}
判断字符串是否以某某开头
startsWith
org.apache.commons.lang3.StringUtils
boolean startsWith(java.lang.CharSequence, java.lang.CharSequence)
${fns:startsWith(str,prefix)}
判断字符串是否以某某结尾
endsWith
org.apache.commons.lang3.StringUtils
boolean endsWith(java.lang.CharSequence, java.lang.CharSequence)
${fns:endsWith(str,suffix)}
缩写字符串,超过最大宽度用“...”表示
abbr
com.thinkgem.jeesite.common.utils.StringUtils
java.lang.String abbr(java.lang.String, int)
${fns:abbr(str,length)}
替换掉HTML标签
replaceHtml
com.thinkgem.jeesite.common.utils.StringUtils
java.lang.String replaceHtml(java.lang.String)
${fns:replaceHtml(html)}
转换为JS获取对象值,生成三目运算返回结果。
jsGetVal
com.thinkgem.jeesite.common.utils.StringUtils
java.lang.String jsGetVal(java.lang.String)
${fns:jsGetVal('row.user.id')} 返回:!row?'':!row.user?'':!row.user.id?'':row.user.id
获取当前日期
getDate
com.thinkgem.jeesite.common.utils.DateUtils
java.lang.String getDate(java.lang.String)
${fns:getDate(pattern)}
获取过去的天数
pastDays
com.thinkgem.jeesite.common.utils.DateUtils
long pastDays(java.util.Date)
${fns:pastDays(date)}
对象转换JSON字符串
toJson
com.thinkgem.jeesite.common.mapper.JsonMapper
java.lang.String toJsonString(java.lang.Object)
${fns:toJson(object)}