简体   繁体   English

如何在liferay 7的liferay模块项目中将一个portlet的jsp重定向到另一个portlet的jsp

[英]how to redirect from jsp of one portlet to jsp of another portlet inside liferay module project in liferay 7

I have created two liferay module project. 我创建了两个liferay模块项目。 one is "portlet-demo1" and second is "portlet-demo2" 一个是“ portlet-demo1”,第二个是“ portlet-demo2”

Now I need to navigate from view.jsp of "portlet-demo1" to view.jsp of "portlet-demo2" 现在,我需要从“ portlet-demo1”的view.jsp导航到“ portlet-demo2”的view.jsp

NOTE : Here both portlet is in separate page. 注意:这两个portlet在单独的页面中。

Now I need to navigate from one portlet jsp to another portlet jsp file. 现在,我需要从一个Portlet JSP导航到另一个Portlet JSP文件。

how to do this using liferay 7. 如何使用liferay 7做到这一点。

If you separate the two portlets into two different modules, you should treat the JSPs of the other module as an implementation detail, eg you can't reach it (even if there'd be a way to reach them). 如果将两个portlet分为两个不同的模块,则应将另一个模块的JSP视为实现细节,例如,您无法到达它(即使有某种方法可以到达它们)。

If the two portlets are tightly coupled and should share their implementation details, you can easily deploy them as a single module. 如果两个Portlet紧密耦合并且应该共享其实现详细信息,则可以轻松地将它们作为单个模块进行部署。 This signals to anybody maintaining them, that they're required to be deployed together. 这向维护它们的任何人发出信号,要求它们必须一起部署。 Otherwise you might end up with one portlet being incomplete because the other portlet updated and nobody was aware that a JSP was used by some external component. 否则,您可能会以一个portlet不完整而告终,因为另一个portlet已更新,并且没人知道某个外部组件使用了JSP。

It's no problem to package two portlets in a single module. 将两个Portlet打包在一个模块中没有问题。 Go with that technique. 用那种技术去吧。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM