0

我有一个portlet。在这个 portlet 中,我有一个 Flex 应用程序,它使用图表显示一些统计数据。

Flex 通过flashVars. 我需要为每种统计信息创建一个页面,因此每个页面都必须包含这个 portlet。

我的问题是我找不到一种方法来为每个 portlet 实例提供不同的参数,以便它们显示不同的数据。

到目前为止,我唯一的解决方案是为每种统计信息创建一个不同的 portlet,但这真的很糟糕。我还尝试在“管理页面”表单上提供一个查询字符串值,但我无法以任何方式检索我在那里定义的参数(尝试过request.getParameter()renderRequest.getParameter()等等)。

有没有办法使用单个 portlet 的多个实例来实现这样的功能?

谢谢

4

1 回答 1

0

This is what the PortletPreferences API is intended to solve, in Liferay, you can set your liferay-portlet.xml to determine whether PortletPreferences are owned by the user, or the layout group (the default).

Then you can implement an edit screen (or config, but edit is the cross-platform standard) to provide a mechanism for users to modify the parameters.

于 2010-03-22T17:01:32.950 回答