在 Liferay 中使用 Orbeon Forms
我想知道 Orbeon Forms 在 Liferay 中如何工作,因为 Web Forms portlet 非常有限,所以我访问了 Orbeon 的网站并阅读了它的文档。然后我下载了它并在 Tomcat 服务器中运行,我使用 Form Builder 构建了一个表单,然后使用 Form Runner 进行了尝试。
我的问题是,如何导出使用表单生成器创建的表单之一,以将其作为 portlet 包含在 Liferay 中?这可能吗?例如,我可以将表单导出到 WAR 中,然后将其部署到 Liferay 中吗?
我知道您可以将 Orbeon Forms 部署到 liferay 中,但我只想包含一个特定的表单,而不是包含表单生成器的所有应用程序、示例等。
有人可以帮助我吗?
I wanted to know how Orbeon Forms work in Liferay because the Web Forms portlet is very limited, so I visited Orbeon's website and read its documentation. Then I downloaded it and ran in a Tomcat server, I built a form with the Form Builder and then tried it with the Form Runner.
My question is, how can I export one of the forms I created with the Form Builder to include it in Liferay as a portlet for example? Is that possible? Can I export a form into a WAR for example and then deploy it into Liferay?
I know you can deploy Orbeon Forms into liferay but I only want to include a specific form, not all the application with the Form Builder, the examples etc.
Could anyone help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,澄清一下:如果您的意思是您只想要“表单”(就 XHTML 而言),那么这是行不通的,因为使用 Orbeon Forms 构建的任何表单都需要运行时才能运行。如果表单是使用 Form Builder 创建的,则意味着 Form Runner 运行时。无论哪种方式,您都需要一个 Orbeon Forms portlet 或 servlet。
您创建的表单在发布后将存储到数据库中。默认情况下,这是内置的 eXist XML 数据库,但您可以使用 Oracle、MySQL 或自定义持久层。
为了在 Liferay 中查看表单,您有两种可能性:
我建议您仔细阅读这两页以了解详细信息。
它的工作方式取决于您使用的 portlet 类型。
如果使用代理 Portlet,则该 Portlet 非常轻量级,仅将请求转发到运行 Form Runner 运行时的单独 Web 应用程序。您将 portlet 配置为指向特定表单。
如果使用完整的 portlet,则 Form Runner 直接作为 portlet 运行。这里 portlet 将加载一个登陆页面,您可能需要修改该登陆页面以指向您希望用户看到的表单。
在这两种情况下,只要 Form Runner 指向正确的数据库,就可以找到您发布的表单。
就您的情况而言,代理 portlet 似乎是您的最佳选择。请注意,自 3.9 以来,代理 portlet 已修复了许多错误,因此我建议每晚构建一次。供参考的是 代理 portlet 的源。
First, a clarification: if what you mean is that you just want "the form", in the sense of just the XHTML, that can't work because any form built with Orbeon Forms needs a runtime to function. If the form is created with Form Builder, that means the Form Runner runtime. Either way you will need an Orbeon Forms portlet or servlet.
The forms you create, when published, are stored into a database. By default this is the built-in eXist XML database, but you can use Oracle, MySQL, or your custom persistence layer.
In order to see forms in Liferay, you have two possibilities:
I recommend you peruse these two pages for details.
How it works depends on which type of portlet you use.
If using the proxy portlet, then the portlet is very lightweight and just forwards requests to a separate webapp running the Form Runner runtime. You configure the portlet to point to a specific form.
If using the full portlet, then Form Runner runs directly as a portlet. Here the portlet will load a landing page, and you probably will want to modify that landing page to point to the forms you want your users to see.
In both cases, your published form will be found as long as Form Runner points to the right database.
In your case it seems like the proxy portlet might be your best option. Note that lots of bug fixes have taken place with the proxy portlet since 3.9, so I would recommend a nightly build. For reference here is the source of the proxy portlet.