playframework中多附件上传注意事项

playframework中多附件上传注意事项

2013年09月24日 play 暂无评论
//play版本问题
经确认,1.0.3.2版本下控制器中方法参数  List<File> files 上传不同文件,获取到的都是第一个文件,坑爹啊,反正升级到1.2.3就没这个问题了.
 
//特容易忘记的关键就是这个enctype,附件上传需要他
#{form @@create(),enctype:'multipart/form-data'}
 

kindeditor-4.1.7编辑器的使用

2013年09月28日 IT技术javascriptplay 暂无评论

需要引入的文件列表

/kindeditor-4.1.7/themes/default/default.css
/kindeditor-4.1.7/kindeditor-min.js
/kindeditor-4.1.7/lang/zh_CN.js"

 

调用

#{table.kindeditor "contentName",id:"contentID",value:contentValue ,height:"300px"/}

 

当然以上是在playframework中调用的自定义标签

路径/app/views/tags/table/kindeditor.html

内容如下

 

%{
name = _arg;
id = _id;
value = _value;
width = _width ? _width: "100%";
height= _height ? _height:"250px";
}%

<script type="text/javascript">
KindEditor.ready(function(K) {
var editor = K.create('#${id}', {
uploadJson : '/Kindeditor/upload',
fileManagerJson : '/Kindeditor/file_manager',
allowFileManager : true,
afterBlur: function(){this.sync();}
});
});
</script>
<textarea name="${name}" id="${id}" style="width: ${width};height: ${height};">${value}</textarea>

posted @ 2015-04-21 16:15  下里巴人or知己  阅读(174)  评论(0编辑  收藏  举报