Liferay通过特定操作链接到另一个portlet [英] Liferay link to another portlet with a specific action

查看:100
本文介绍了Liferay通过特定操作链接到另一个portlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义的导航portlet,其中包含指向门户中几个页面的链接.但是,其中一些链接是子菜单"选项,它们实际上是特定portlet的操作.例如,看这张图片:

I have a custom navigation portlet which includes links to several pages in my portal. Some of these links, though, are "submenu" options that are actually actions of a specific portlet. For instance, take a look at this image:

我有一个Portlet,它显示电影列表,并且还可以按流派应用过滤器.我在图像中圈出的那些链接应该是带有电影列表" portlet的页面的链接,但是每个链接的动作都不同.

I have a portlet that displays a list of movies, and can also apply a filter by genre. Those links I've circled in my image should be links to the page with the Movie List portlet, but with a different action for each link.

我该如何实现?我只能在一个portlet中创建actionURL,而不能为其他portlet创建.

How can I achieve that? I can only make actionURLs within a portlet, not for other portlets.

推荐答案

您可以使用liferay而非portlet标准提供的以下标记来创建到另一个portlet的actionURL:

You can create actionURLs to another portlet using the following tag provided by liferay and not by the portlet standard:

<liferay-portlet:actionURL plid="" portletName=""  />

其中"plid"是该portlet所在页面的布局ID,"portlet名称"是该portlet的portlet ID,该portlet定义了您要调用的动作.

where "plid" is the layout id of the page that the portlet is in and "portlet name" is the portlet id of the portlet that defines the actions that you want to call.

但是,如果您提到的链接将过滤器应用于电影列表,则还可以对页面渲染进行过滤,而不必使用动作处理.

However, if the links you mention, apply filters to the movies list, then you could also do the filtering on page render and not necessarily using action processing.

这篇关于Liferay通过特定操作链接到另一个portlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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