© 2004 BEA Systems, Inc.

com.bea.netuix.servlets.controls.window.backing
Class WindowBackingContext

java.lang.Object
  extended bycom.bea.netuix.servlets.controls.ControlContext
      extended bycom.bea.netuix.servlets.controls.BackingContext
          extended bycom.bea.netuix.servlets.controls.window.backing.WindowBackingContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PageBackingContext, PortletBackingContext

public abstract class WindowBackingContext
extends BackingContext

This is the backing context class for a Window. Use this class when in a backing file to get information about the owning window. If you want to access this context from a JSP, look at WindowPresentationContext instead.

You can obtain the backing context for the active window by calling BackingContext.getContextFromRequest

See Also:
BackingContext, Serialized Form

Method Summary
 boolean getCapabilityVisible(String name)
          Gets the visible property for a capability.
 String getDefinitionId()
          Return the definition id of this portlet, page or book.
 String getDefinitionLabel()
          Get the definition label for the portlet/page or book.
 String getDescription()
          Returns the description for the current window.
 String getInstanceId()
          Return the instance id of this portlet.
abstract  String getLabel()
          Return the label for the control.
 String getOrientation()
          Get the orientation of the navigation bar or titlebar of the current window.
 BackingContext getParentWindowBackingContext()
          Get the BackingContext of the parent of the current window.
 String getPlacementId()
          Get the PlacementId for this window.
 WindowMode getPreviousWindowMode()
          Get the previous WindowMode.
 WindowState getPreviousWindowState()
          Get the previous WindowState.
 List getRenderedChildrenWindowBackingContexts()
          This method returns a deep List containing all the Window, Page, and Book backing contexts of these type of controls that are rendered.
 String getTitle()
          Get the title of the window.
 WindowMode getWindowMode()
          Return the current window mode.
 WindowState getWindowState()
          Return the current window state.
 boolean isCapable(Capability capability)
          Determine if this control has the given capability.
 boolean isPacked()
          Get true if the current window is packed.
 void setCapabilityVisible(String name, boolean isVisible)
          Sets the visible property for a capability.
 void setDescription(String description)
          Set window description.
 void setTitle(String title)
          Set the window's title.
 void setupModeChangeEvent(String modeValue)
          Tell the window to change its mode.
 void setupModeChangeEvent(WindowMode modeValue)
          Tell the window to change its mode.
 void setupPageChangeEvent(String pageLabel)
          Tell the window to change the page.
 void setupStateChangeEvent(String stateValue)
          Tell the window to change its state.
 
Methods inherited from class com.bea.netuix.servlets.controls.BackingContext
getChildrenBackingContexts, getParentBackingContext, getTopParentBackingContext, isBackingPhase, isVisible, setBackingPhase, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLabel

public abstract String getLabel()
Return the label for the control. This will be the instance label for portlets and the definition label for pages and books.

Returns:
the label from the book, page or portlet.

getTitle

public String getTitle()
Get the title of the window.


setCapabilityVisible

public void setCapabilityVisible(String name,
                                 boolean isVisible)
                          throws NullPointerException
Sets the visible property for a capability. name should be the Capability name. This must be called in the pre-render method or earlier, and is reset upon every new request.

Parameters:
name - the Capability name
isVisible - is it visible
Throws:
NullPointerException

getCapabilityVisible

public boolean getCapabilityVisible(String name)
                             throws NullPointerException
Gets the visible property for a capability. name should be the Capability name.

Parameters:
name - the Capability name
Returns:
is it visible
Throws:
NullPointerException

setTitle

public void setTitle(String title)

Set the window's title. Note: this method only sets the title for the current request. If you want to set the title permanently (and you are in streaming mode - not single file) then use the PortalCustomizationManager EJB.

Parameters:
title -
See Also:
IPortletInstanceManager.updatePortletInstance(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.DesktopDefinitionId, com.bea.netuix.application.instance.PortletInstance)

getDescription

public String getDescription()
Returns the description for the current window.

Returns:
description

setDescription

public void setDescription(String description)
Set window description. Note this method only sets the description for the current request. If you want to set the description permanently (and you are in streaming mode - not single file) then use the PortalCustomizationManager EJB.

Parameters:
description -
See Also:
IPortletInstanceManager.updatePortletInstance(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.DesktopDefinitionId, com.bea.netuix.application.instance.PortletInstance)

getDefinitionLabel

public String getDefinitionLabel()
Get the definition label for the portlet/page or book.

Returns:
a String containing the window's definition label.

getInstanceId

public String getInstanceId()
Return the instance id of this portlet. Note: the instance id is only populated when in streaming mode, not single file.

Returns:
A string representation of the portlet's instance id (this is always a number)

getDefinitionId

public String getDefinitionId()
Return the definition id of this portlet, page or book. Note: the definition id is only populated in streaming mode (database, not single file). This can be useful with the persistence API.

Returns:
A string representation of the windows defintion id (this is always a number)

getRenderedChildrenWindowBackingContexts

public List getRenderedChildrenWindowBackingContexts()
This method returns a deep List containing all the Window, Page, and Book backing contexts of these type of controls that are rendered.

Returns:
List of BookBackingContext, WindowBackingContext, and PageBackingContext

setupModeChangeEvent

public void setupModeChangeEvent(String modeValue)
Tell the window to change its mode. Should be called during handlePostback.

Parameters:
modeValue - the mode to change to

setupModeChangeEvent

public void setupModeChangeEvent(WindowMode modeValue)
Tell the window to change its mode. Should be called during handlePostback.

Parameters:
modeValue - the mode to change to

setupStateChangeEvent

public void setupStateChangeEvent(String stateValue)
Tell the window to change its state. Should be called during handlePostback.

Parameters:
stateValue - the state to change to

setupPageChangeEvent

public void setupPageChangeEvent(String pageLabel)
Tell the window to change the page. Should be called during handlePostback.

Parameters:
pageLabel - the label of the page to change to

getWindowMode

public WindowMode getWindowMode()
Return the current window mode.

Returns:
mode

getWindowState

public WindowState getWindowState()
Return the current window state.

Returns:
window state

getOrientation

public String getOrientation()
Get the orientation of the navigation bar or titlebar of the current window. Value can be top(default), left, right.

Returns:
titlebar or navigation bar orientation

getPlacementId

public String getPlacementId()
Get the PlacementId for this window.

Returns:
PlacementId
See Also:
PlacementId

isPacked

public boolean isPacked()
Get true if the current window is packed.

Returns:
true if packed

getPreviousWindowState

public WindowState getPreviousWindowState()
Get the previous WindowState.

Returns:
WindowState

getPreviousWindowMode

public WindowMode getPreviousWindowMode()
Get the previous WindowMode.

Returns:
WindowMode

getParentWindowBackingContext

public BackingContext getParentWindowBackingContext()
Get the BackingContext of the parent of the current window.

Returns:
parent window BackingContext

isCapable

public boolean isCapable(Capability capability)
Determine if this control has the given capability.

Parameters:
capability - - window mode or state
See Also:
WindowCapabilities

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved