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 fin开发者_如何转开发d 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.
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
Inside processAction(..)
:
actionResponse.setWindowState(WindowState.MAXIMIZED);
inside doView(..)
:
renderRequest.setWindowState(WindowState.MAXIMIZED);
精彩评论