Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sesemomo
spring-framework
提交
72a8868f
S
spring-framework
项目概览
sesemomo
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
72a8868f
编写于
6月 13, 2017
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FreeMarker macros based on HTML output format (requires FreeMarker 2.3.24+)
Issue: SPR-14740
上级
a0cea9a8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl
...rg/springframework/web/servlet/view/freemarker/spring.ftl
+13
-13
未找到文件。
spring-webmvc/src/main/resources/org/springframework/web/servlet/view/freemarker/spring.ftl
浏览文件 @
72a8868f
<#ftl strip_whitespace=true>
<#ftl
output_format="HTML"
strip_whitespace=true>
<#--
* spring.ftl
*
...
...
@@ -157,7 +157,7 @@
-->
<#macro formInput path attributes="" fieldType="text">
<@bind path/>
<input type="${fieldType}" id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" value="<#if fieldType!="password">${stringStatusValue}</#if>" ${attributes}<@closeTag/>
<input type="${fieldType}" id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" value="<#if fieldType!="password">${stringStatusValue}</#if>" ${attributes
?no_esc
}<@closeTag/>
</#macro>
<#--
...
...
@@ -202,7 +202,7 @@
-->
<#macro formTextarea path attributes="">
<@bind path/>
<textarea id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes}>
<textarea id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes
?no_esc
}>
${stringStatusValue}</textarea>
</#macro>
...
...
@@ -219,14 +219,14 @@ ${stringStatusValue}</textarea>
-->
<#macro formSingleSelect path options attributes="">
<@bind path/>
<select id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes}>
<select id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes
?no_esc
}>
<#if options?is_hash>
<#list options?keys as value>
<option value="${value
?html}"<@checkSelected value/>>${options[value]?html
}</option>
<option value="${value
}"<@checkSelected value/>>${options[value]
}</option>
</#list>
<#else>
<#list options as value>
<option value="${value
?html}"<@checkSelected value/>>${value?html
}</option>
<option value="${value
}"<@checkSelected value/>>${value
}</option>
</#list>
</#if>
</select>
...
...
@@ -245,10 +245,10 @@ ${stringStatusValue}</textarea>
-->
<#macro formMultiSelect path options attributes="">
<@bind path/>
<select multiple="multiple" id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes}>
<select multiple="multiple" id="${status.expression?replace('[','')?replace(']','')}" name="${status.expression}" ${attributes
?no_esc
}>
<#list options?keys as value>
<#assign isSelected = contains(status.actualValue?default([""]), value)>
<option value="${value
?html}"<#if isSelected> selected="selected"</#if>>${options[value]?html
}</option>
<option value="${value
}"<#if isSelected> selected="selected"</#if>>${options[value]
}</option>
</#list>
</select>
</#macro>
...
...
@@ -269,8 +269,8 @@ ${stringStatusValue}</textarea>
<@bind path/>
<#list options?keys as value>
<#assign id="${status.expression?replace('[','')?replace(']','')}${value_index}">
<input type="radio" id="${id}" name="${status.expression}" value="${value
?html}"<#if stringStatusValue == value> checked="checked"</#if> ${attributes
}<@closeTag/>
<label for="${id}">${options[value]
?html
}</label>${separator}
<input type="radio" id="${id}" name="${status.expression}" value="${value
}"<#if stringStatusValue == value> checked="checked"</#if> ${attributes?no_esc
}<@closeTag/>
<label for="${id}">${options[value]}</label>${separator}
</#list>
</#macro>
...
...
@@ -291,8 +291,8 @@ ${stringStatusValue}</textarea>
<#list options?keys as value>
<#assign id="${status.expression?replace('[','')?replace(']','')}${value_index}">
<#assign isSelected = contains(status.actualValue?default([""]), value)>
<input type="checkbox" id="${id}" name="${status.expression}" value="${value
?html}"<#if isSelected> checked="checked"</#if> ${attributes
}<@closeTag/>
<label for="${id}">${options[value]
?html
}</label>${separator}
<input type="checkbox" id="${id}" name="${status.expression}" value="${value
}"<#if isSelected> checked="checked"</#if> ${attributes?no_esc
}<@closeTag/>
<label for="${id}">${options[value]}</label>${separator}
</#list>
<input type="hidden" name="_${status.expression}" value="on"/>
</#macro>
...
...
@@ -311,7 +311,7 @@ ${stringStatusValue}</textarea>
<#assign id="${status.expression?replace('[','')?replace(']','')}">
<#assign isSelected = status.value?? && status.value?string=="true">
<input type="hidden" name="_${status.expression}" value="on"/>
<input type="checkbox" id="${id}" name="${status.expression}"<#if isSelected> checked="checked"</#if> ${attributes}/>
<input type="checkbox" id="${id}" name="${status.expression}"<#if isSelected> checked="checked"</#if> ${attributes
?no_esc
}/>
</#macro>
<#--
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录