|
Home > Archive > WebSphere Portal Server > April 2004 > WindowListener deprecated - how Notified of window events
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
WindowListener deprecated - how Notified of window events
|
|
| Zheng Yi 2004-04-26, 7:33 am |
| WindowListener and WindowEvent are deprecated. The API says to use
PortletWindow.getWindowState(). How is the portlet notified of window
events and where do I use getWindowState()?
thanks
| |
| Marco Beelen 2004-04-27, 3:33 am |
| Within the doView()-method for your portlet you can do:
request.getWindow().getWindowState() to determine the WindowState.
Sample code to determine how to use this:
PortletWindow.State portletState = request.getWindow().getWindowState();
if ( PortletWindow.State.MAXIMIZED.equals( portletState ) ) {
include( "maximized.jsp", request, response )
}
else {
include( "normal.jsp", request, response );
}
Zheng Yi wrote:
> WindowListener and WindowEvent are deprecated. The API says to use
> PortletWindow.getWindowState(). How is the portlet notified of window
> events and where do I use getWindowState()?
>
> thanks
>
>
| |
| Zheng Yi 2004-04-27, 11:34 am |
| Does that mean I need to repeat that code in each supported mode?
"Marco Beelen" <marco.beelen@axxius.nl> wrote in message
news:c6l0vb$5es6$1@news.boulder.ibm.com...[vbcol=seagreen]
> Within the doView()-method for your portlet you can do:
> request.getWindow().getWindowState() to determine the WindowState.
>
>
> Sample code to determine how to use this:
>
> PortletWindow.State portletState = request.getWindow().getWindowState();
> if ( PortletWindow.State.MAXIMIZED.equals( portletState ) ) {
> include( "maximized.jsp", request, response )
> }
> else {
> include( "normal.jsp", request, response );
> }
>
>
>
>
> Zheng Yi wrote:
| |
| Zheng Yi 2004-04-27, 11:34 am |
| How does this effect portlet caching, when does the container call
getLastModified(), in the even phase or render phase?
thanks
"Marco Beelen" <marco.beelen@axxius.nl> wrote in message
news:c6l0vb$5es6$1@news.boulder.ibm.com...[vbcol=seagreen]
> Within the doView()-method for your portlet you can do:
> request.getWindow().getWindowState() to determine the WindowState.
>
>
> Sample code to determine how to use this:
>
> PortletWindow.State portletState = request.getWindow().getWindowState();
> if ( PortletWindow.State.MAXIMIZED.equals( portletState ) ) {
> include( "maximized.jsp", request, response )
> }
> else {
> include( "normal.jsp", request, response );
> }
>
>
>
>
> Zheng Yi wrote:
|
|
|
|
|