Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set the window state to maximed by default

 
John Lincoln
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

thanks
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

-Cameron
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic