File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Portals and Portlets and the fly likes Set the window state to maximed by default Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Set the window state to maximed by default" Watch "Set the window state to maximed by default" New topic

Set the window state to maximed by default

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192

How can i set the window state to maximized by default. I mean when the portlet first appears it should be maximized state.

In the doView i am not able to do that, since RenderResponse does not have method for setting WindowState only ActionResponse has it.

Is it possible. Please throw some light

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

State changes, such as moving a portlet to the maximized mode must be done during the even processing phase, and unfortunately, when a portlet first renders, the even processing phase is bypassed.

With WebSphere, we have special pages called screens, where a screen occupies the entire, renderable, window. These are used for registering for the portal, logging in, and self-care activities. A WebSphere Portal Screen might be applicable for this situation if a) you are using WebSphere Portal, and b) if you don't expect this app to be deployed as a normal portlet.

Another option might be to make it the only portlet on the page, and then lock the page so the use cannot add any new content.

Of course, I don't really like any of these ideas in a portlal. It makes you question the reason as to why you are using a portal in the first place. Working with the portal means a bit of a mind shift - you have to think portal, and rid yourself of the JSF, Struts and Servlet/JSP mentality.

What is the compelling reason for keeping the portlet maximized?

I agree. Here's the link:
subject: Set the window state to maximed by default
It's not a secret anymore!