Fórum

Control panel portlet for specific portal instance

thumbnail
Riccardo Ferrari, modificado 12 Anos atrás.

Control panel portlet for specific portal instance

Regular Member Postagens: 139 Data de Entrada: 13/11/10 Postagens Recentes
Hello everybody,

I'm developing a portlet that doesn't have a user interface other than an administrative one. It would be nice to put it inside control panel (of course!)
Now, my portal is running multiple portal instances on the same Liferay portal installation. I would tight the portlet to a specific portal instance.
How do I achieve that?

I did some homework and developed my own ControlPanel class (that extends BaseControlPanel class). How do I get current portal instance?
Is there a best practice?

EDIT: Currently I'm checking against themeDisplay.getPortalURL() and works. Is there a better way to achieve that?

Thanks
thumbnail
Thiago Leão Moreira, modificado 12 Anos atrás.

RE: Control panel portlet for specific portal instance

Liferay Legend Postagens: 1449 Data de Entrada: 10/10/07 Postagens Recentes
You can get the companyId from themeDisplay object and make the necessary cheking.