Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I programatically make a Liferay Portlet go into Full Screen Mode

I'm sure it's an easy thing, but I can't find it anywhere. How do I programatically make a portlet inside of Liferay go into Full Screen Mode. eg: the equivalent of clicking on the maximise button, but in code rather than having to make the user manually click that button.

like image 491
rustyshelf Avatar asked Jan 13 '10 00:01

rustyshelf


People also ask

What is portlet in Liferay?

Web apps in Liferay DXP are called portlets. Like many web apps, portlets process requests and generate responses. In the response, the portlet returns content (e.g. HTML, XHTML) for display in browsers.

How do I hide portlet in Liferay?

On Liferay Portal 6.2 EE, if one would like to make the title of a portlet non-visible, an easy way is to set an empty string ('') as title.


2 Answers

You can set window state in the action phase. ActionResponse interface has method setWindowState().

You cannot change the state in the render phase -- try to imagine what would happened if two or more portlets decided to maximize themself.

  • method setWindowState()
  • class WindowState
like image 125
Jaromir Hamala Avatar answered Nov 14 '22 23:11

Jaromir Hamala


Inside processAction(..):

actionResponse.setWindowState(WindowState.MAXIMIZED);

inside doView(..):

renderRequest.setWindowState(WindowState.MAXIMIZED);
like image 25
Intesar Mohammed Avatar answered Nov 14 '22 23:11

Intesar Mohammed