liferay 中的 portlet 渲染
我有两个 portlet,这两个是两个不同的 Web 应用程序(war)。
当用户从 Portlet1 选择单选按钮时,它必须切换到 Portlet2。
我能够从 Portlet1 发布事件,并能够从 Portlet2 进行处理,并且两者都在从 liferay 门户创建的页面模板的单独部分中呈现。
但我的问题是Portlet2必须覆盖portlet1分区(同时显示内容)并且必须在Portlet1内容分区中显示Portlet2内容。
我正在使用 liferay 6.0.5 并使用 struts portlet 插件将现有应用程序迁移到 liferay 门户。
I have two portlets and these two are two different web applications (war).
When the user selects a radio button from Portlet1 it has to switch to Portlet2.
I am able to publish the event from Portlet1 and able to process from Portlet2 and both are getting rendered in separate divisions of the page template created from liferay portal.
But my problem is Portlet2 has to overlay portlet1 division (while displaying the content) and has to display the Portlet2 content in Portlet1 content division.
I am using liferay 6.0.5 and using struts portlet plugin to migrate existing application to liferay portal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的建议是将 Portlet1 和 Portlet2 打包到同一个 WAR 文件中。在这种情况下,两个 portlet 将使用相同的 JSP,您只需使用 2 个而不是 1 个 portlet 配置 portlet XML 文件(portlet.xml 和 liferay-portlet.xml)。您可以将两个 portlet 配置为使用不同的启动视图。
通过这种设置,可以轻松地从一个视图移动到另一个视图,因为您只需在一个 WAR 文件内的 JSP 之间进行切换,并且实际上并不需要 portlet 间的通信。
My suggestion would be to package both Portlet1 and Portlet2 into the same WAR file. Both portlets will use the same JSPs in that case and you will just configure the portlet XML files (portlet.xml and liferay-portlet.xml) with 2 portlets instead of one. You can configure both portlets to use a different start view.
With this setup it is easy to move from one view to another, as you're just switching between JSPs inside one WAR file and you don't really need inter-portlet communication.