如何支持Web形式的Liferay 7中的文件上传? [英] How to support file upload in web-form Liferay 7?

查看:78
本文介绍了如何支持Web形式的Liferay 7中的文件上传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要Liferay Web表单的简单扩展,以增强文件附件到Liferay 7 Web表单中存储的数据中的功能.

I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form.

还需要将此文件作为电子邮件的附件发送给注册用户.

Also need to sent this file as an attachment with the email to the registered user.

我知道如何在liferay 6.2中实现此功能,但不了解liferay7.我正在使用liferay 7 GA-5 CE.

I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE.

任何帮助表示赞赏.

推荐答案

您需要创建自定义表单字段类型插件,请在

You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type. and follow below steps,

  1. 将输入类型更改为大豆文件路径中的文件是
  1. Change input type to file in soy file path is

src/main/resources/META-INF/resources/your-plugin-type-name.soy

src/main/resources/META-INF/resources/your-plugin-type-name.soy

  • 创建dynamic.data.list.form.web捆绑包的片段,并覆盖display/view.jsp以接受文件(即多部分数据).
  • 覆盖 AddRecordMVCActionCommand 操作命令以根据需要存储所选文件.
  • 构建和部署所有3个插件
  • Create a fragment of dynamic.data.list.form.web bundle and override display/view.jsp to accept the file i.e. multipart data.
  • Override AddRecordMVCActionCommand action command to store the selected file as you required.
  • Build and deploy all 3 plugins
  • 希望这会对您有所帮助.

    Hope this will help you.

    这篇关于如何支持Web形式的Liferay 7中的文件上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆