b042fa64fd20e68531b3ebcd3ebb207641380c20.svn-base
10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
<description>JSTL 1.1 functions library</description>
<display-name>JSTL functions sys</display-name>
<tlib-version>1.1</tlib-version>
<short-name>fns</short-name>
<uri>http://java.sun.com/jsp/jstl/functionss</uri>
<function>
<description>获取管理路径</description>
<name>getAdminPath</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.String getAdminPath()</function-signature>
<example>${fns:getAdminPath()}</example>
</function>
<function>
<description>获取网站路径</description>
<name>getFrontPath</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.String getFrontPath()</function-signature>
<example>${fns:getFrontPath()}</example>
</function>
<function>
<description>获取网站URL后缀</description>
<name>getUrlSuffix</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.String getUrlSuffix()</function-signature>
<example>${fns:getUrlSuffix()}</example>
</function>
<function>
<description>获取配置</description>
<name>getConfig</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.String getConfig(java.lang.String)</function-signature>
<example>${fns:getConfig(key)}</example>
</function>
<function>
<description>获取常量</description>
<name>getConst</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.Object getConst(java.lang.String)</function-signature>
<example>${fns:getConst(key)}</example>
</function>
<function>
<description>获取一窗受理</description>
<name>isYcsl</name>
<function-class>com.thinkgem.jeesite.common.config.Global</function-class>
<function-signature>java.lang.Boolean isYcsl()</function-signature>
<example>${fns:isYcsl()}</example>
</function>
<!-- UserUtils -->
<function>
<description>获取当前用户对象</description>
<name>getUser</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>com.thinkgem.jeesite.modules.sys.entity.User getUser()</function-signature>
<example>${fns:getUser()}</example>
</function>
<function>
<description>根据编码获取用户对象</description>
<name>getUserById</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>com.thinkgem.jeesite.modules.sys.entity.User get(java.lang.String)</function-signature>
<example>${fns:getUserById(id)}</example>
</function>
<function>
<description>获取授权用户信息</description>
<name>getPrincipal</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal getPrincipal()</function-signature>
<example>${fns:getPrincipal()}</example>
</function>
<function>
<description>获取当前用户的菜单对象列表</description>
<name>getMenuList</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>java.util.List getMenuList()</function-signature>
<example>${fns:getMenuList()}</example>
</function>
<function>
<description>获取当前用户的区域对象列表</description>
<name>getAreaList</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>java.util.List getAreaList()</function-signature>
<example>${fns:getAreaList()}</example>
</function>
<function>
<description>获取当前用户的部门对象列表</description>
<name>getOfficeList</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>java.util.List getOfficeList()</function-signature>
<example>${fns:getOfficeList()}</example>
</function>
<function>
<description>获取当前用户缓存</description>
<name>getCache</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
<function-signature>java.lang.Object getCache(java.lang.String, java.lang.Object)</function-signature>
<example>${fns:getCache(cacheName, defaultValue)}</example>
</function>
<!-- DictUtils -->
<function>
<description>获取字典标签</description>
<name>getDictLabel</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
<function-signature>java.lang.String getDictLabel(java.lang.String, java.lang.String, java.lang.String)</function-signature>
<example>${fns:getDictLabel(value, type, defaultValue)}</example>
</function>
<function>
<description>获取字典标签(多个)</description>
<name>getDictLabels</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
<function-signature>java.lang.String getDictLabels(java.lang.String, java.lang.String, java.lang.String)</function-signature>
<example>${fns:getDictLabels(values, type, defaultValue)}</example>
</function>
<function>
<description>获取字典值</description>
<name>getDictValue</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
<function-signature>java.lang.String getDictValue(java.lang.String, java.lang.String, java.lang.String)</function-signature>
<example>${fns:getDictValue(label, type, defaultValue)}</example>
</function>
<function>
<description>获取字典对象列表</description>
<name>getDictList</name>
<function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
<function-signature>java.util.List getDictList(java.lang.String)</function-signature>
<example>${fns:getDictList(type)}</example>
</function>
<!-- Encodes -->
<function>
<description>URL编码</description>
<name>urlEncode</name>
<function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
<function-signature>java.lang.String urlEncode(java.lang.String)</function-signature>
<example>${fns:urlEncode(part)}</example>
</function>
<function>
<description>URL解码</description>
<name>urlDecode</name>
<function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
<function-signature>java.lang.String urlDecode(java.lang.String)</function-signature>
<example>${fns:urlDecode(part)}</example>
</function>
<function>
<description>HTML编码</description>
<name>escapeHtml</name>
<function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
<function-signature>java.lang.String escapeHtml(java.lang.String)</function-signature>
<example>${fns:escapeHtml(html)}</example>
</function>
<function>
<description>HTML解码</description>
<name>unescapeHtml</name>
<function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
<function-signature>java.lang.String unescapeHtml(java.lang.String)</function-signature>
<example>${fns:unescapeHtml(html)}</example>
</function>
<!-- StringUtils -->
<function>
<description>从后边开始截取字符串</description>
<name>substringAfterLast</name>
<function-class>org.apache.commons.lang3.StringUtils</function-class>
<function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature>
<example>${fns:substringAfterLast(str,separator)}</example>
</function>
<function>
<description>判断字符串是否以某某开头</description>
<name>startsWith</name>
<function-class>org.apache.commons.lang3.StringUtils</function-class>
<function-signature>boolean startsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
<example>${fns:startsWith(str,prefix)}</example>
</function>
<function>
<description>判断字符串是否以某某结尾</description>
<name>endsWith</name>
<function-class>org.apache.commons.lang3.StringUtils</function-class>
<function-signature>boolean endsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
<example>${fns:endsWith(str,suffix)}</example>
</function>
<function>
<description>缩写字符串,超过最大宽度用“...”表示</description>
<name>abbr</name>
<function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
<function-signature>java.lang.String abbr(java.lang.String, int)</function-signature>
<example>${fns:abbr(str,length)}</example>
</function>
<function>
<description>替换掉HTML标签</description>
<name>replaceHtml</name>
<function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
<function-signature>java.lang.String replaceHtml(java.lang.String)</function-signature>
<example>${fns:replaceHtml(html)}</example>
</function>
<function>
<description>转换为JS获取对象值,生成三目运算返回结果。</description>
<name>jsGetVal</name>
<function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
<function-signature>java.lang.String jsGetVal(java.lang.String)</function-signature>
<example>${fns:jsGetVal('row.user.id')} 返回:!row?'':!row.user?'':!row.user.id?'':row.user.id</example>
</function>
<!-- DateUtils -->
<function>
<description>获取当前日期</description>
<name>getDate</name>
<function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
<function-signature>java.lang.String getDate(java.lang.String)</function-signature>
<example>${fns:getDate(pattern)}</example>
</function>
<function>
<description>获取过去的天数</description>
<name>pastDays</name>
<function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
<function-signature>long pastDays(java.util.Date)</function-signature>
<example>${fns:pastDays(date)}</example>
</function>
<!-- JsonMapper -->
<function>
<description>对象转换JSON字符串</description>
<name>toJson</name>
<function-class>com.thinkgem.jeesite.common.mapper.JsonMapper</function-class>
<function-signature>java.lang.String toJsonString(java.lang.Object)</function-signature>
<example>${fns:toJson(object)}</example>
</function>
</taglib>