com.bea.netuix.servlets.controls.page
Class PageBackingContext

java.lang.Object
  extended by com.bea.netuix.servlets.controls.ControlContext
      extended by com.bea.netuix.servlets.controls.BackingContext
          extended by com.bea.netuix.servlets.controls.window.backing.WindowBackingContext
              extended by com.bea.netuix.servlets.controls.page.PageBackingContext
All Implemented Interfaces
Serializable
Direct Known Subclasses:
BookBackingContext

public class PageBackingContext
extends WindowBackingContext

This is the backing context for a page. As such, it is meant to be called from backing files or pageflows. If you want to access this context from a JSP, look at PagePresentationContext instead.

Call getContextFromRequest to obtain the backing context for the active window.

See Also
Serialized Form

Field Summary
protected static String CLASS_NAME
           
 
Method Summary
 String getActiveImage()
          Get the path to the image displayed in the menu tab when the page is active.
 BookBackingContext getBookBackingContextRecursive(String definitionLabel)
          Return a book searching the entire tree recursively.
 String getInactiveImage()
          Get the path to the image displayed in the menu tab when the page is inactive.
 String getLabel()
          Returns the definition label on the page
 String getMarkupName()
          Returns the value of the Page's markupName attribute.
 String getMarkupType()
          Returns the value of the Page's markupType attribute.
static PageBackingContext getPageBackingContext(javax.servlet.http.HttpServletRequest request)
          Get the PageBackingContext from the request
 PageBackingContext getPageBackingContextRecursive(String definitionLabel)
          Return a book or a page but traverse the entire tree.
 BookBackingContext getParentBookBackingContext()
          Returns the BookBackingContext of the book that is the parent of the page represented by this context.
 PageBackingContext getParentPageBackingContext()
          Returns the PageBackingContext of the Page that is the parent of the page represented by this context.
 PortletBackingContext getPortletBackingContextRecursive(String instanceLabel)
          Return the portlet backing context matching the supplied instance label.
Note: this method may return null if called from the init() method of a backing context.
 PortletBackingContext[] getPortletsBackingContextRecursive(String definitionLabel)
          Return portlet backing contexts matching the supplied definition label.
 String getRolloverImage()
          Get the path to the rollover image to be displayed on the menu tab for this page.
 List getWindowBackingContexts()
          Return the collection of child WindowBackingContexts (BookBackingContext or PortletBackingContext) for this page.
 boolean isActive()
          Return true if this page is active.
 boolean isDisplayed()
          Return true if this page is going to be displayed.
 boolean isHidden()
          Return the value of the underlying object's hidden attribute.
 void setActive(boolean active)
          Set the value of the underlying object's active attribute.
 void setActiveImage(String activeImage)
          Set the path to the image displayed in the menu tab when the page is active.
 void setHidden(boolean hidden)
          Set the value of the underlying object's hidden attribute.
 void setInactiveImage(String inactiveImage)
          Set the path to the image displayed in the menu tab when the page is already active.
 void setRolloverImage(String rolloverImage)
          Set the path to the rollover image to be displayed on the menu tab for this page.
 
Methods inherited from class com.bea.netuix.servlets.controls.window.backing.WindowBackingContext
getCapability, getCapabilityVisible, getDefinitionId, getDefinitionLabel, getDescription, getInstanceId, getMetaData, getMetaDatas, getOrientation, getParentWindowBackingContext, getPlacementId, getPreviousWindowMode, getPreviousWindowState, getRenderedChildrenWindowBackingContexts, getTitle, getWindowMode, getWindowState, isCapable, isPacked, setCapabilityVisible, setDescription, setTitle, setupModeChangeEvent, setupModeChangeEvent, setupPageChangeEvent, setupStateChangeEvent, setupStateChangeEventFromParent
 
Methods inherited from class com.bea.netuix.servlets.controls.BackingContext
ensureCurrentLifecycleStageLegalForOperation, getChildrenBackingContexts, getParentBackingContext, getParsedProperties, getProperties, getProperty, getProperty, getSendRedirectPath, getTopParentBackingContext, isBackingPhase, isVisible, sendRedirect, setBackingPhase, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

protected static final String CLASS_NAME
Method Detail

getLabel

public String getLabel()
Returns the definition label on the page

Specified by:
getLabel in class WindowBackingContext
Returns
the definition label of the page

getParentBookBackingContext

public BookBackingContext getParentBookBackingContext()
Returns the BookBackingContext of the book that is the parent of the page represented by this context.

Returns
the BookBackingContext of the Book that is the parent of the page represented by this context, or null if there is no parent book.
See Also
Page.getBook()

getMarkupName

public String getMarkupName()
Returns the value of the Page's markupName attribute.


getMarkupType

public String getMarkupType()
Returns the value of the Page's markupType attribute.


getParentPageBackingContext

public PageBackingContext getParentPageBackingContext()
Returns the PageBackingContext of the Page that is the parent of the page represented by this context.

Overrides:
getParentPageBackingContext in class WindowBackingContext
Returns
the PageBackingContext of the Page that is the parent of the Page represented by this context or null if there is no parent page.
See Also
Page.getParentPage()

isActive

public boolean isActive()
Return true if this page is active. Note: this is different from isDisplayed in that an active page is not necessarily always displayed as the parent book may not be active. Active pages can have an inactive parent book but when the parent is activated again the current page is remembered.

Returns
true if the page/book is active.

isHidden

public boolean isHidden()
Return the value of the underlying object's hidden attribute. A hidden page is a page that does not show up as a tab in a book's menu. It may still be activated via links and events, however.

Returns
a boolean, the value of the underlying object's hidden attribute.

setActive

public void setActive(boolean active)
Set the value of the underlying object's active attribute. A hidden page is a page that does not show up as a tab in a book's menu. It may still be activated via links and events, however.

Parameters
active - boolean, the new value of the underlying object's active attribute.

setHidden

public void setHidden(boolean hidden)
Set the value of the underlying object's hidden attribute.

Parameters
hidden - boolean, the new value of the underlying object's hidden attribute.

getPageBackingContext

public static PageBackingContext getPageBackingContext(javax.servlet.http.HttpServletRequest request)
Get the PageBackingContext from the request


getActiveImage

public String getActiveImage()
Get the path to the image displayed in the menu tab when the page is active.

Returns
the path to the image

setActiveImage

public void setActiveImage(String activeImage)
Set the path to the image displayed in the menu tab when the page is active.

Parameters
activeImage - a URI to the new activate image.

getInactiveImage

public String getInactiveImage()
Get the path to the image displayed in the menu tab when the page is inactive.

Returns
the path as defined in the IDE for the image when the page is inactive.

setInactiveImage

public void setInactiveImage(String inactiveImage)
Set the path to the image displayed in the menu tab when the page is already active.

Parameters
inactiveImage -

getRolloverImage

public String getRolloverImage()
Get the path to the rollover image to be displayed on the menu tab for this page.


setRolloverImage

public void setRolloverImage(String rolloverImage)
Set the path to the rollover image to be displayed on the menu tab for this page.

Parameters
rolloverImage -

isDisplayed

public boolean isDisplayed()

Return true if this page is going to be displayed. This method should be called late in the lifecycle preRender() to determine if this page will be displayed. If called earlier in the lifecycle handlePostBackData() it will return true if the page was previously display.


Note: this is different from isActive in that an active page is not necessarily always displayed as the parent book may not be active.

Returns
true or false

getWindowBackingContexts

public List getWindowBackingContexts()

Return the collection of child WindowBackingContexts (BookBackingContext or PortletBackingContext) for this page. If no portlets and books exist returns an empty list.

Returns
List of BookBackingContext and PortletBackingContexts objects

getBookBackingContextRecursive

public BookBackingContext getBookBackingContextRecursive(String definitionLabel)
Return a book searching the entire tree recursively. If you are interested in both books AND pages use getPageBackingContextRecursive() as that method returns both.
Note: this method may return null if called from the init() method of a backing context.

Parameters
definitionLabel - of the book
Returns
the Book of interest or null if not found.

getPageBackingContextRecursive

public PageBackingContext getPageBackingContextRecursive(String definitionLabel)
Return a book or a page but traverse the entire tree. The search will go inside books that are on pages too.
Note: this method may return null if called from the init() method of a backing context.

Parameters
definitionLabel -
Returns
pageBackingContext or (BookBackingContext if book) of the page or book with matching definition label.

getPortletBackingContextRecursive

public PortletBackingContext getPortletBackingContextRecursive(String instanceLabel)
Return the portlet backing context matching the supplied instance label.
Note: this method may return null if called from the init() method of a backing context.

Parameters
instanceLabel - unique instance label of the portlet
Returns
a reference to the portlet's BackingContext if it exist otherwise null.

getPortletsBackingContextRecursive

public PortletBackingContext[] getPortletsBackingContextRecursive(String definitionLabel)
Return portlet backing contexts matching the supplied definition label. Since many portlets can share the same definition label, more then one portlet can be returned. If you are interested in just one portlet then try getPortletBackingContextRecursive(String instanceLabel).
Note: this method may return null if called from the init() method of a backing context.

Parameters
definitionLabel - label of the portlet
Returns
a non null array of PortletBackingContext.


Copyright © 2011, Oracle. All rights reserved.