Fórumok

Public Rendering Parameter - Hook problem

Rene Ramacher, módosítva 9 év-val korábban

Public Rendering Parameter - Hook problem

New Member Bejegyzések: 12 Csatlakozás dátuma: 2014.12.19. Legújabb bejegyzések
I need to use a custom defined public rendering parameter (contextId) in a hook that extends the wiki portlet. However, attempting to access the parameter value from the view.jsp of the wiki-portlet via request.getAttribute("contextId") returns null, even in the case that the parameter is actually contained in the URL. The parameter in the URL looks like “p_r_p_-103590493_contextId=-28281583”, so I’m sure that the parameter is correctly set.

I examined the problem more deeply and I find out that all public rendering parameters that are consumed by a portlet need to be specified in the portlet.xml of the consuming portlet as well. However, since I use a hook to extend the wiki-portlet, I have no access to the portlet.xml of the wiki-portlet.

So, what can I do to access the public rendering parameter in the hook? Is it somehow possible to access the public rendering parameter in the hook without defining it in the portlet.xml of the wiki-portlet? Or, is there an alternative way how I can specify the public rendering parameter to be used in the wiki-portlet?

Thanks in advance
René
thumbnail
Jan Geißler, módosítva 9 év-val korábban

RE: Public Rendering Parameter - Hook problem

Liferay Master Bejegyzések: 735 Csatlakozás dátuma: 2011.07.05. Legújabb bejegyzések
I think, you would have to check out the sources and modify them there.
I don't know if that works, but maybe you might want to try an ext plugin. Maybe that way you are able to override the portlet.xml