Liferay Window States
What is window state: window state indicate the amount of space taken by the portlet
All java supported portlets have the below modes:
- Minimized: only portlet title bar is displayed when user clicks
- Maximized:The portlet occupies entire page
- remove : The portlet will be removed from the page
Liferay added two more window states apart from the 3 (Normal, Minimized and Maximized) which WindowState provides:
1) Exclusive: Any pop-up or jsp opened with this window state would not be having any theme applied to it.
2) Pop-up: This the window state when a pop-up is opened in liferay like when you click any configuration icon on a portlet the pop-up which opens has this window state. Simply put it applies all the CSS and html minus the dockbar, that is it applies the theme from the template portal_pop_up.vm instead of the portal_normal.vm.
You can use com.liferay.portal.kernel.portlet.LiferayWindowState.java class to get liferay window state objects
How to set window state to url in liferay?
Like below you can set window state and use either LiferayWindowState or javax.portlet.WindowState.java (for java portlet modes)
<portlet:renderURL var="addProdURL" copyCurrentRenderParameters="false" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>" > <portlet:param name="cmd" value="addProduct" /> </portlet:renderURL>