0
votes

I would like to know how can i call the default portlet's configuration page from another portlet.

My idea is to have one portlet that lists all my portlets and next to each of this portlets i want to have a button that will open a popup with a that portlet's configuration page (the same that is called when you use the wrench icon on the top right corner of a portlet)

My idea was to crate a actionURL where i pass the portletId as a parameter.

The point is, i could not figure out how to call the portlet configuration action. Is it possible to do?

thanks

1

1 Answers

0
votes

The most important question to ask yourself is: Does it provide value to modify the (already existing and fully working) configuration UI with your own - instead of implementing more business value for your users. You're typically choosing a portal environment like Liferay because you don't want to take care of stuff that's already been taken care of (among other reasons).

By design, every portlet is strictly separated from every other portlet. Thus it's most likely not a simple one-liner (or a checkbox) that will help you. The configuration (or preferences) dialog typically modifies PortletPreferences - the persistence of these is what the portal typically takes care of.

You'll have to evaluate what you'd rather like to do: Embed other portlet's views into yours, fighting the componentization of a portal, or store/retrieve your preferences (and configuration dialog) in a different storage place than portlet preferences. Or check how easy it is to actually get at the data that you might need access to.

To give you an answer that's more towards the original question - still abstract enough that you'll have to invest some research: You can experiment with "opening" dialog components that contain a different portlet's view in MAXIMIZED windowstate - thus you only get that portlet content and can use it in an AUI popup dialog - those are AFAIK implemented with iframe help, and you can only see the "remote" portlet's output. After all, the configuration page of a portlet is nothing else but a specific view (with a specific portlet mode) that can be triggered by a few URL parameter. Sniffing the HTTP traffic will give you some ideas on what kind of parameters are going over the line.

In short: There's a lot of research to do, the usecase you're asking for is not well documented (because the problem of configuring portlets is thought to be solved and people rather invest in adding business value than providing already existing functionality with a different URL)