Liferay Symposium 2016 | Reserve your seat today.
(Opens New Window)
Mark as an Answer
Dynamically add / remove (or show / hide) portlets?
September 24, 2012 5:24 AM
Rank: New Member
Join Date: September 18, 2012
I'm developing a new liferay portal application and I want to be able to dynamically add / remove (or show / hide) one of my portlets (for searching).
I'm already able to add a portlet through following code:
FacesContext ctx = FacesContext.getCurrentInstance();
ThemeDisplay themeDisplay = (ThemeDisplay) ctx.getExternalContext().getRequestMap().get(WebKeys.THEME_DISPLAY);
Layout layout = themeDisplay.getLayout();
Which is nice, but the portlet only shows up after a full page reload. I want to avoid this if possible.
Can anyone help me with this?
Or if this is not possible, maybe it is possible to just mini- / de-minimize a specified portlet (through it's ID) from another Portlet?
Any help is appreciated!
QuickEdit: While I'm at it, it would generally be nice if someone could tell me how to influence one portlet from another one. Like changing the position (from left column to right etc)!
Sign in to vote.
Please sign in to flag this as inappropriate.