views:

348

answers:

2

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.

+3  A: 

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.

Jaromir Hamala
A: 

Inside processAction(..)

actionRequest.setWindowState(WindowState.MAXIMIZED);

inside doView(..)

renderRequest.setWindowState(WindowState.MAXIMIZED);

Intesar Mohammed