views:

395

answers:

1

Hi!

I have a portlet. Inside of this portlet I have Flex application that displays some stats using charts. Flex recognize what stats it needs to display, by a parameter provided in flashVars. I need to create one page for each kind of stats and so every page must contain before mentioned portlet. My problem is that I can't find a way to provide different parameter to each of portlet instances so they could display different data. My only solution up until now was to create different portlet for each kind of stats, but that's really lame. I also tried to provide Query String through 'Manage Pages' form but I couldn't retrieve parameters I defined there in any way (tried request.getParameter(), renderRequest.getParameter() etc.) Is there any way to achieve such functionality using multiple instances of single portlet?

Thanks

A: 

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.

jayshao